texplay 0.2.1-x86-mswin32-60
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/CHANGELOG +68 -0
 - data/README +21 -0
 - data/README1st +9 -0
 - data/Rakefile +85 -0
 - data/examples/basic.rb +48 -0
 - data/examples/basic2.rb +37 -0
 - data/examples/benchmark.rb +299 -0
 - data/examples/common.rb +8 -0
 - data/examples/example_alpha_blend.rb +31 -0
 - data/examples/example_bezier.rb +51 -0
 - data/examples/example_color_control.rb +68 -0
 - data/examples/example_color_transform.rb +29 -0
 - data/examples/example_dup.rb +52 -0
 - data/examples/example_each.rb +42 -0
 - data/examples/example_effect.rb +35 -0
 - data/examples/example_fill.rb +49 -0
 - data/examples/example_fill_old.rb +49 -0
 - data/examples/example_fluent.rb +31 -0
 - data/examples/example_gen_eval.rb +34 -0
 - data/examples/example_hash_arguments.rb +47 -0
 - data/examples/example_melt.rb +27 -0
 - data/examples/example_polyline.rb +43 -0
 - data/examples/example_simple.rb +35 -0
 - data/examples/example_sync.rb +60 -0
 - data/examples/example_turtle.rb +40 -0
 - data/examples/media/empty2.png +0 -0
 - data/examples/media/gosu.png +0 -0
 - data/examples/media/maria.png +0 -0
 - data/examples/media/rose.bmp +0 -0
 - data/examples/media/sand1.png +0 -0
 - data/examples/media/sunset.png +0 -0
 - data/examples/media/texplay.png +0 -0
 - data/examples/specs.rb +240 -0
 - data/examples/test.rb +70 -0
 - data/examples/test2.rb +72 -0
 - data/lib/ctexplay.18.so +0 -0
 - data/lib/ctexplay.19.so +0 -0
 - data/lib/texplay-contrib.rb +77 -0
 - data/lib/texplay.rb +134 -0
 - data/src/Makefile +181 -0
 - data/src/TAGS +286 -0
 - data/src/actions.c +1306 -0
 - data/src/actions.h +52 -0
 - data/src/actions.obj +0 -0
 - data/src/bindings.c +1081 -0
 - data/src/bindings.h +45 -0
 - data/src/bindings.obj +0 -0
 - data/src/cache.c +132 -0
 - data/src/cache.h +24 -0
 - data/src/cache.obj +0 -0
 - data/src/compat.h +23 -0
 - data/src/ctexplay-i386-mswin32.def +2 -0
 - data/src/ctexplay-i386-mswin32.exp +0 -0
 - data/src/ctexplay-i386-mswin32.lib +0 -0
 - data/src/ctexplay-i386-mswin32.pdb +0 -0
 - data/src/ctexplay.so +0 -0
 - data/src/extconf.rb +18 -0
 - data/src/gen_eval.c +209 -0
 - data/src/gen_eval.h +20 -0
 - data/src/gen_eval.obj +0 -0
 - data/src/mkmf.log +18 -0
 - data/src/object2module.c +171 -0
 - data/src/object2module.h +11 -0
 - data/src/object2module.obj +0 -0
 - data/src/texplay.c +136 -0
 - data/src/texplay.h +107 -0
 - data/src/texplay.obj +0 -0
 - data/src/utils.c +959 -0
 - data/src/utils.h +143 -0
 - data/src/utils.obj +0 -0
 - data/src/vc60.pdb +0 -0
 - metadata +132 -0
 
    
        data/examples/test.rb
    ADDED
    
    | 
         @@ -0,0 +1,70 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            require 'common'
         
     | 
| 
      
 2 
     | 
    
         
            +
            require 'gosu'
         
     | 
| 
      
 3 
     | 
    
         
            +
            require 'texplay'
         
     | 
| 
      
 4 
     | 
    
         
            +
             
     | 
| 
      
 5 
     | 
    
         
            +
            class MyWindow < Gosu::Window
         
     | 
| 
      
 6 
     | 
    
         
            +
                def initialize
         
     | 
| 
      
 7 
     | 
    
         
            +
                    super(1024, 768, false, 20)
         
     | 
| 
      
 8 
     | 
    
         
            +
             
     | 
| 
      
 9 
     | 
    
         
            +
                    # image for texture filling
         
     | 
| 
      
 10 
     | 
    
         
            +
                    @gosu = Gosu::Image.new(self,"#{Common::MEDIA}/gosu.png")
         
     | 
| 
      
 11 
     | 
    
         
            +
             
     | 
| 
      
 12 
     | 
    
         
            +
                    # images for testing
         
     | 
| 
      
 13 
     | 
    
         
            +
                    @unchanged = Gosu::Image.new(self,"#{Common::MEDIA}/texplay.png")  
         
     | 
| 
      
 14 
     | 
    
         
            +
                    @simple = Gosu::Image.new(self,"#{Common::MEDIA}/texplay.png")  
         
     | 
| 
      
 15 
     | 
    
         
            +
                    @polyline = Gosu::Image.new(self,"#{Common::MEDIA}/texplay.png") 
         
     | 
| 
      
 16 
     | 
    
         
            +
                    @bezier = Gosu::Image.new(self,"#{Common::MEDIA}/texplay.png") 
         
     | 
| 
      
 17 
     | 
    
         
            +
                    @flood_fill = Gosu::Image.new(self,"#{Common::MEDIA}/texplay.png") 
         
     | 
| 
      
 18 
     | 
    
         
            +
             
     | 
| 
      
 19 
     | 
    
         
            +
                    # height and width
         
     | 
| 
      
 20 
     | 
    
         
            +
                    @width = @simple.width
         
     | 
| 
      
 21 
     | 
    
         
            +
                    @height = @simple.height
         
     | 
| 
      
 22 
     | 
    
         
            +
             
     | 
| 
      
 23 
     | 
    
         
            +
                    # initializations
         
     | 
| 
      
 24 
     | 
    
         
            +
                    setup_simple
         
     | 
| 
      
 25 
     | 
    
         
            +
                    setup_polyline
         
     | 
| 
      
 26 
     | 
    
         
            +
                    setup_bezier
         
     | 
| 
      
 27 
     | 
    
         
            +
                    setup_flood_fill
         
     | 
| 
      
 28 
     | 
    
         
            +
             
     | 
| 
      
 29 
     | 
    
         
            +
                end
         
     | 
| 
      
 30 
     | 
    
         
            +
             
     | 
| 
      
 31 
     | 
    
         
            +
                def setup_simple
         
     | 
| 
      
 32 
     | 
    
         
            +
                    @simple.line 0, 0, 1024, 1024
         
     | 
| 
      
 33 
     | 
    
         
            +
                    @simple.rect 0,0, @width - 1, @height - 1
         
     | 
| 
      
 34 
     | 
    
         
            +
                    @simple.circle @simple.width/2, @simple.height/2, 30
         
     | 
| 
      
 35 
     | 
    
         
            +
                end
         
     | 
| 
      
 36 
     | 
    
         
            +
             
     | 
| 
      
 37 
     | 
    
         
            +
                def setup_polyline
         
     | 
| 
      
 38 
     | 
    
         
            +
                    @polyline.polyline [0, 0, @width / 2, @height - 1, @width - 1, 0]
         
     | 
| 
      
 39 
     | 
    
         
            +
                end
         
     | 
| 
      
 40 
     | 
    
         
            +
             
     | 
| 
      
 41 
     | 
    
         
            +
                def setup_bezier
         
     | 
| 
      
 42 
     | 
    
         
            +
                    points = []
         
     | 
| 
      
 43 
     | 
    
         
            +
                    10.times {
         
     | 
| 
      
 44 
     | 
    
         
            +
                        point = []
         
     | 
| 
      
 45 
     | 
    
         
            +
                        point[0] = @width * rand
         
     | 
| 
      
 46 
     | 
    
         
            +
                        point[1] = @height * rand
         
     | 
| 
      
 47 
     | 
    
         
            +
             
     | 
| 
      
 48 
     | 
    
         
            +
                        points += point
         
     | 
| 
      
 49 
     | 
    
         
            +
                    }
         
     | 
| 
      
 50 
     | 
    
         
            +
                    @bezier.bezier points
         
     | 
| 
      
 51 
     | 
    
         
            +
                end
         
     | 
| 
      
 52 
     | 
    
         
            +
             
     | 
| 
      
 53 
     | 
    
         
            +
                def setup_flood_fill
         
     | 
| 
      
 54 
     | 
    
         
            +
                    @flood_fill.fill 100, 96, :color => :random, :scan => true
         
     | 
| 
      
 55 
     | 
    
         
            +
                end
         
     | 
| 
      
 56 
     | 
    
         
            +
             
     | 
| 
      
 57 
     | 
    
         
            +
                def draw
         
     | 
| 
      
 58 
     | 
    
         
            +
             
     | 
| 
      
 59 
     | 
    
         
            +
                    @simple.draw(20, 10, 1)
         
     | 
| 
      
 60 
     | 
    
         
            +
                    @polyline.draw(20, 210, 1)
         
     | 
| 
      
 61 
     | 
    
         
            +
                    @bezier.draw(20, 410, 1)
         
     | 
| 
      
 62 
     | 
    
         
            +
                    @flood_fill.draw(400, 10, 1)
         
     | 
| 
      
 63 
     | 
    
         
            +
             
     | 
| 
      
 64 
     | 
    
         
            +
                end
         
     | 
| 
      
 65 
     | 
    
         
            +
            end
         
     | 
| 
      
 66 
     | 
    
         
            +
             
     | 
| 
      
 67 
     | 
    
         
            +
            w = MyWindow.new
         
     | 
| 
      
 68 
     | 
    
         
            +
            w.show
         
     | 
| 
      
 69 
     | 
    
         
            +
             
     | 
| 
      
 70 
     | 
    
         
            +
                
         
     | 
    
        data/examples/test2.rb
    ADDED
    
    | 
         @@ -0,0 +1,72 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            require 'common'
         
     | 
| 
      
 2 
     | 
    
         
            +
            require 'gosu'
         
     | 
| 
      
 3 
     | 
    
         
            +
            require 'texplay'
         
     | 
| 
      
 4 
     | 
    
         
            +
             
     | 
| 
      
 5 
     | 
    
         
            +
            class MyWindow < Gosu::Window
         
     | 
| 
      
 6 
     | 
    
         
            +
                def initialize
         
     | 
| 
      
 7 
     | 
    
         
            +
                    super(1024, 768, false, 20)
         
     | 
| 
      
 8 
     | 
    
         
            +
             
     | 
| 
      
 9 
     | 
    
         
            +
                    # image for texture filling
         
     | 
| 
      
 10 
     | 
    
         
            +
                    @gosu = Gosu::Image.new(self,"#{Common::MEDIA}/gosu.png")
         
     | 
| 
      
 11 
     | 
    
         
            +
             
     | 
| 
      
 12 
     | 
    
         
            +
                    # images for testing
         
     | 
| 
      
 13 
     | 
    
         
            +
                    @unchanged = Gosu::Image.new(self,"#{Common::MEDIA}/texplay.png")  
         
     | 
| 
      
 14 
     | 
    
         
            +
                    @simple = Gosu::Image.new(self,"#{Common::MEDIA}/texplay.png")  
         
     | 
| 
      
 15 
     | 
    
         
            +
                    @polyline = Gosu::Image.new(self,"#{Common::MEDIA}/texplay.png") 
         
     | 
| 
      
 16 
     | 
    
         
            +
                    @bezier = Gosu::Image.new(self,"#{Common::MEDIA}/texplay.png") 
         
     | 
| 
      
 17 
     | 
    
         
            +
                    @flood_fill = Gosu::Image.new(self,"#{Common::MEDIA}/texplay.png") 
         
     | 
| 
      
 18 
     | 
    
         
            +
             
     | 
| 
      
 19 
     | 
    
         
            +
                    # height and width
         
     | 
| 
      
 20 
     | 
    
         
            +
                    @width = @simple.width
         
     | 
| 
      
 21 
     | 
    
         
            +
                    @height = @simple.height
         
     | 
| 
      
 22 
     | 
    
         
            +
             
     | 
| 
      
 23 
     | 
    
         
            +
                    # initializations
         
     | 
| 
      
 24 
     | 
    
         
            +
                    setup_simple
         
     | 
| 
      
 25 
     | 
    
         
            +
                    setup_polyline
         
     | 
| 
      
 26 
     | 
    
         
            +
                    setup_bezier
         
     | 
| 
      
 27 
     | 
    
         
            +
                    setup_flood_fill
         
     | 
| 
      
 28 
     | 
    
         
            +
             
     | 
| 
      
 29 
     | 
    
         
            +
                end
         
     | 
| 
      
 30 
     | 
    
         
            +
             
     | 
| 
      
 31 
     | 
    
         
            +
                def setup_simple
         
     | 
| 
      
 32 
     | 
    
         
            +
                    @simple.line 0, 0, 1024, 1024
         
     | 
| 
      
 33 
     | 
    
         
            +
                    @simple.rect 0,0, @width - 1, @height - 1
         
     | 
| 
      
 34 
     | 
    
         
            +
                    @simple.circle @simple.width/2, @simple.height/2, 30
         
     | 
| 
      
 35 
     | 
    
         
            +
                end
         
     | 
| 
      
 36 
     | 
    
         
            +
             
     | 
| 
      
 37 
     | 
    
         
            +
                def setup_polyline
         
     | 
| 
      
 38 
     | 
    
         
            +
                    @polyline.polyline [0, 0, @width / 2, @height - 1, @width - 1, 0]
         
     | 
| 
      
 39 
     | 
    
         
            +
                end
         
     | 
| 
      
 40 
     | 
    
         
            +
             
     | 
| 
      
 41 
     | 
    
         
            +
                def setup_bezier
         
     | 
| 
      
 42 
     | 
    
         
            +
                    points = []
         
     | 
| 
      
 43 
     | 
    
         
            +
                    10.times {
         
     | 
| 
      
 44 
     | 
    
         
            +
                        point = []
         
     | 
| 
      
 45 
     | 
    
         
            +
                        point[0] = @width * rand
         
     | 
| 
      
 46 
     | 
    
         
            +
                        point[1] = @height * rand
         
     | 
| 
      
 47 
     | 
    
         
            +
             
     | 
| 
      
 48 
     | 
    
         
            +
                        points += point
         
     | 
| 
      
 49 
     | 
    
         
            +
                    }
         
     | 
| 
      
 50 
     | 
    
         
            +
                    @bezier.bezier points
         
     | 
| 
      
 51 
     | 
    
         
            +
                end
         
     | 
| 
      
 52 
     | 
    
         
            +
             
     | 
| 
      
 53 
     | 
    
         
            +
                def setup_flood_fill
         
     | 
| 
      
 54 
     | 
    
         
            +
                    @flood_fill.fill 100, 96, :color => :random
         
     | 
| 
      
 55 
     | 
    
         
            +
                end
         
     | 
| 
      
 56 
     | 
    
         
            +
             
     | 
| 
      
 57 
     | 
    
         
            +
                def draw
         
     | 
| 
      
 58 
     | 
    
         
            +
             
     | 
| 
      
 59 
     | 
    
         
            +
                    @simple.draw(20, 10, 1)
         
     | 
| 
      
 60 
     | 
    
         
            +
                    @polyline.draw(20, 210, 1)
         
     | 
| 
      
 61 
     | 
    
         
            +
                    @bezier.draw(20, 410, 1)
         
     | 
| 
      
 62 
     | 
    
         
            +
                    @flood_fill.draw(400, 10, 1)
         
     | 
| 
      
 63 
     | 
    
         
            +
             
     | 
| 
      
 64 
     | 
    
         
            +
                    @polyline.paint
         
     | 
| 
      
 65 
     | 
    
         
            +
             
     | 
| 
      
 66 
     | 
    
         
            +
                end
         
     | 
| 
      
 67 
     | 
    
         
            +
            end
         
     | 
| 
      
 68 
     | 
    
         
            +
             
     | 
| 
      
 69 
     | 
    
         
            +
            w = MyWindow.new
         
     | 
| 
      
 70 
     | 
    
         
            +
            w.show
         
     | 
| 
      
 71 
     | 
    
         
            +
             
     | 
| 
      
 72 
     | 
    
         
            +
                
         
     | 
    
        data/lib/ctexplay.18.so
    ADDED
    
    | 
         Binary file 
     | 
    
        data/lib/ctexplay.19.so
    ADDED
    
    | 
         Binary file 
     | 
| 
         @@ -0,0 +1,77 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            begin
         
     | 
| 
      
 2 
     | 
    
         
            +
                require 'rubygems'
         
     | 
| 
      
 3 
     | 
    
         
            +
            rescue LoadError
         
     | 
| 
      
 4 
     | 
    
         
            +
            end
         
     | 
| 
      
 5 
     | 
    
         
            +
             
     | 
| 
      
 6 
     | 
    
         
            +
            require 'texplay'
         
     | 
| 
      
 7 
     | 
    
         
            +
             
     | 
| 
      
 8 
     | 
    
         
            +
            # setup will be executed straight after Gosu::Image instantiation
         
     | 
| 
      
 9 
     | 
    
         
            +
            TexPlay.on_setup do
         
     | 
| 
      
 10 
     | 
    
         
            +
                @turtle_pos = TexPlay::TPPoint.new(width / 2, height / 2 )
         
     | 
| 
      
 11 
     | 
    
         
            +
                @turtle_angle = 0
         
     | 
| 
      
 12 
     | 
    
         
            +
            end
         
     | 
| 
      
 13 
     | 
    
         
            +
             
     | 
| 
      
 14 
     | 
    
         
            +
            TexPlay.create_macro(:move_to) do |x, y|
         
     | 
| 
      
 15 
     | 
    
         
            +
                capture { 
         
     | 
| 
      
 16 
     | 
    
         
            +
                    @turtle_pos.x = x
         
     | 
| 
      
 17 
     | 
    
         
            +
                    @turtle_pos.y = y
         
     | 
| 
      
 18 
     | 
    
         
            +
                }
         
     | 
| 
      
 19 
     | 
    
         
            +
            end
         
     | 
| 
      
 20 
     | 
    
         
            +
             
     | 
| 
      
 21 
     | 
    
         
            +
            TexPlay.create_macro(:move_rel) do |dx, dy|
         
     | 
| 
      
 22 
     | 
    
         
            +
                capture { 
         
     | 
| 
      
 23 
     | 
    
         
            +
                    @turtle_pos.x += dx
         
     | 
| 
      
 24 
     | 
    
         
            +
                    @turtle_pos.y += dy
         
     | 
| 
      
 25 
     | 
    
         
            +
                }
         
     | 
| 
      
 26 
     | 
    
         
            +
            end
         
     | 
| 
      
 27 
     | 
    
         
            +
             
     | 
| 
      
 28 
     | 
    
         
            +
            TexPlay.create_macro(:line_to) do |x, y, *other|
         
     | 
| 
      
 29 
     | 
    
         
            +
                capture { 
         
     | 
| 
      
 30 
     | 
    
         
            +
                    line(@turtle_pos.x, @turtle_pos.y, x, y, *other)
         
     | 
| 
      
 31 
     | 
    
         
            +
             
     | 
| 
      
 32 
     | 
    
         
            +
                    @turtle_pos.x, @turtle_pos.y = x, y
         
     | 
| 
      
 33 
     | 
    
         
            +
                }
         
     | 
| 
      
 34 
     | 
    
         
            +
            end
         
     | 
| 
      
 35 
     | 
    
         
            +
             
     | 
| 
      
 36 
     | 
    
         
            +
            TexPlay.create_macro(:line_rel) do |dx, dy, *other|
         
     | 
| 
      
 37 
     | 
    
         
            +
                capture { 
         
     | 
| 
      
 38 
     | 
    
         
            +
                    x = @turtle_pos.x + dx
         
     | 
| 
      
 39 
     | 
    
         
            +
                    y = @turtle_pos.y + dy
         
     | 
| 
      
 40 
     | 
    
         
            +
             
     | 
| 
      
 41 
     | 
    
         
            +
                    line(@turtle_pos.x, @turtle_pos.y, x, y, *other)
         
     | 
| 
      
 42 
     | 
    
         
            +
             
     | 
| 
      
 43 
     | 
    
         
            +
                    @turtle_pos.x, @turtle_pos.y = x, y
         
     | 
| 
      
 44 
     | 
    
         
            +
                }
         
     | 
| 
      
 45 
     | 
    
         
            +
            end
         
     | 
| 
      
 46 
     | 
    
         
            +
             
     | 
| 
      
 47 
     | 
    
         
            +
            TexPlay.create_macro(:turn_to) do |a|
         
     | 
| 
      
 48 
     | 
    
         
            +
                capture {
         
     | 
| 
      
 49 
     | 
    
         
            +
                    @turtle_angle = a
         
     | 
| 
      
 50 
     | 
    
         
            +
                }
         
     | 
| 
      
 51 
     | 
    
         
            +
            end
         
     | 
| 
      
 52 
     | 
    
         
            +
             
     | 
| 
      
 53 
     | 
    
         
            +
            TexPlay.create_macro(:turn) do |da|
         
     | 
| 
      
 54 
     | 
    
         
            +
                capture { 
         
     | 
| 
      
 55 
     | 
    
         
            +
                    @turtle_angle += da
         
     | 
| 
      
 56 
     | 
    
         
            +
                }
         
     | 
| 
      
 57 
     | 
    
         
            +
            end
         
     | 
| 
      
 58 
     | 
    
         
            +
             
     | 
| 
      
 59 
     | 
    
         
            +
            TexPlay.create_macro(:forward) do |dist, *other|
         
     | 
| 
      
 60 
     | 
    
         
            +
                capture {
         
     | 
| 
      
 61 
     | 
    
         
            +
                    visible = other.shift
         
     | 
| 
      
 62 
     | 
    
         
            +
             
     | 
| 
      
 63 
     | 
    
         
            +
                    radians_per_degree = 0.0174532925199433
         
     | 
| 
      
 64 
     | 
    
         
            +
             
     | 
| 
      
 65 
     | 
    
         
            +
                    x = @turtle_pos.x + dist * Math::cos(radians_per_degree * @turtle_angle)
         
     | 
| 
      
 66 
     | 
    
         
            +
                    y = @turtle_pos.y + dist * Math::sin(radians_per_degree * @turtle_angle)
         
     | 
| 
      
 67 
     | 
    
         
            +
             
     | 
| 
      
 68 
     | 
    
         
            +
                    if(visible) then
         
     | 
| 
      
 69 
     | 
    
         
            +
                        line_to(x, y, *other)
         
     | 
| 
      
 70 
     | 
    
         
            +
                    else
         
     | 
| 
      
 71 
     | 
    
         
            +
                        move_to(x, y)
         
     | 
| 
      
 72 
     | 
    
         
            +
                    end
         
     | 
| 
      
 73 
     | 
    
         
            +
                }
         
     | 
| 
      
 74 
     | 
    
         
            +
            end
         
     | 
| 
      
 75 
     | 
    
         
            +
             
     | 
| 
      
 76 
     | 
    
         
            +
             
     | 
| 
      
 77 
     | 
    
         
            +
             
     | 
    
        data/lib/texplay.rb
    ADDED
    
    | 
         @@ -0,0 +1,134 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            # (C) John Mair 2009, under the MIT licence
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            begin
         
     | 
| 
      
 4 
     | 
    
         
            +
                require 'rubygems'
         
     | 
| 
      
 5 
     | 
    
         
            +
            rescue LoadError
         
     | 
| 
      
 6 
     | 
    
         
            +
            end
         
     | 
| 
      
 7 
     | 
    
         
            +
             
     | 
| 
      
 8 
     | 
    
         
            +
            # include gosu first
         
     | 
| 
      
 9 
     | 
    
         
            +
            require 'rbconfig'
         
     | 
| 
      
 10 
     | 
    
         
            +
            require 'gosu'
         
     | 
| 
      
 11 
     | 
    
         
            +
             
     | 
| 
      
 12 
     | 
    
         
            +
            module TexPlay
         
     | 
| 
      
 13 
     | 
    
         
            +
                TEXPLAY_VERSION = "0.2.1"
         
     | 
| 
      
 14 
     | 
    
         
            +
             
     | 
| 
      
 15 
     | 
    
         
            +
                def self.on_setup(&block)
         
     | 
| 
      
 16 
     | 
    
         
            +
                    raise "need a block" if !block
         
     | 
| 
      
 17 
     | 
    
         
            +
                    
         
     | 
| 
      
 18 
     | 
    
         
            +
                    @__init_procs__ ||= []
         
     | 
| 
      
 19 
     | 
    
         
            +
                    @__init_procs__.push(block)
         
     | 
| 
      
 20 
     | 
    
         
            +
                end
         
     | 
| 
      
 21 
     | 
    
         
            +
             
     | 
| 
      
 22 
     | 
    
         
            +
                def self.setup(receiver)
         
     | 
| 
      
 23 
     | 
    
         
            +
                    if @__init_procs__ then
         
     | 
| 
      
 24 
     | 
    
         
            +
                        @__init_procs__.each do |init_proc|
         
     | 
| 
      
 25 
     | 
    
         
            +
                            receiver.instance_eval(&init_proc)
         
     | 
| 
      
 26 
     | 
    
         
            +
                        end
         
     | 
| 
      
 27 
     | 
    
         
            +
                    end
         
     | 
| 
      
 28 
     | 
    
         
            +
                end
         
     | 
| 
      
 29 
     | 
    
         
            +
             
     | 
| 
      
 30 
     | 
    
         
            +
                def self.create_blank_image(window, width, height)
         
     | 
| 
      
 31 
     | 
    
         
            +
                    Gosu::Image.new(window, EmptyImageStub.new(width, height))
         
     | 
| 
      
 32 
     | 
    
         
            +
                end
         
     | 
| 
      
 33 
     | 
    
         
            +
             
     | 
| 
      
 34 
     | 
    
         
            +
                module Colors
         
     | 
| 
      
 35 
     | 
    
         
            +
                    Red = [1, 0, 0, 1]
         
     | 
| 
      
 36 
     | 
    
         
            +
                    Green = [0, 1, 0, 1]
         
     | 
| 
      
 37 
     | 
    
         
            +
                    Blue = [0, 0, 1, 1]
         
     | 
| 
      
 38 
     | 
    
         
            +
                    Black = [0, 0, 0, 1]
         
     | 
| 
      
 39 
     | 
    
         
            +
                    White = [1, 1, 1, 1]
         
     | 
| 
      
 40 
     | 
    
         
            +
                    Grey = [0.5, 0.5, 0.5, 0.5]
         
     | 
| 
      
 41 
     | 
    
         
            +
                    Alpha = [0, 0, 0, 0]
         
     | 
| 
      
 42 
     | 
    
         
            +
                    Purple = [1, 0, 1, 1]
         
     | 
| 
      
 43 
     | 
    
         
            +
                    Yellow = [1, 1, 0, 1]
         
     | 
| 
      
 44 
     | 
    
         
            +
                    Cyan = [0, 1, 1, 1]
         
     | 
| 
      
 45 
     | 
    
         
            +
                    Orange = [1, 0.5, 0, 1]
         
     | 
| 
      
 46 
     | 
    
         
            +
                    Brown = [0.39, 0.26, 0.13, 1]
         
     | 
| 
      
 47 
     | 
    
         
            +
                    Turquoise = [1, 0.6, 0.8, 1]
         
     | 
| 
      
 48 
     | 
    
         
            +
                    Tyrian = [0.4, 0.007, 0.235, 1]
         
     | 
| 
      
 49 
     | 
    
         
            +
                end
         
     | 
| 
      
 50 
     | 
    
         
            +
                include Colors
         
     | 
| 
      
 51 
     | 
    
         
            +
            end
         
     | 
| 
      
 52 
     | 
    
         
            +
             
     | 
| 
      
 53 
     | 
    
         
            +
            # credit to philomory for this class
         
     | 
| 
      
 54 
     | 
    
         
            +
            class EmptyImageStub
         
     | 
| 
      
 55 
     | 
    
         
            +
                def initialize(w,h)
         
     | 
| 
      
 56 
     | 
    
         
            +
                    @w, @h = w, h;
         
     | 
| 
      
 57 
     | 
    
         
            +
                end
         
     | 
| 
      
 58 
     | 
    
         
            +
                
         
     | 
| 
      
 59 
     | 
    
         
            +
                def to_blob
         
     | 
| 
      
 60 
     | 
    
         
            +
                    "\0" * @w * @h * 4
         
     | 
| 
      
 61 
     | 
    
         
            +
                end
         
     | 
| 
      
 62 
     | 
    
         
            +
                
         
     | 
| 
      
 63 
     | 
    
         
            +
                def rows
         
     | 
| 
      
 64 
     | 
    
         
            +
                    @h
         
     | 
| 
      
 65 
     | 
    
         
            +
                end
         
     | 
| 
      
 66 
     | 
    
         
            +
                
         
     | 
| 
      
 67 
     | 
    
         
            +
                def columns
         
     | 
| 
      
 68 
     | 
    
         
            +
                    @w
         
     | 
| 
      
 69 
     | 
    
         
            +
                end
         
     | 
| 
      
 70 
     | 
    
         
            +
            end
         
     | 
| 
      
 71 
     | 
    
         
            +
             
     | 
| 
      
 72 
     | 
    
         
            +
            # bring in user-defined extensions to TexPlay
         
     | 
| 
      
 73 
     | 
    
         
            +
            direc = File.dirname(__FILE__)
         
     | 
| 
      
 74 
     | 
    
         
            +
            dlext = Config::CONFIG['DLEXT']
         
     | 
| 
      
 75 
     | 
    
         
            +
            begin
         
     | 
| 
      
 76 
     | 
    
         
            +
                if RUBY_VERSION && RUBY_VERSION =~ /1.9/
         
     | 
| 
      
 77 
     | 
    
         
            +
                    require "#{direc}/ctexplay.19.#{dlext}"
         
     | 
| 
      
 78 
     | 
    
         
            +
                else
         
     | 
| 
      
 79 
     | 
    
         
            +
                    require "#{direc}/ctexplay.18.#{dlext}"
         
     | 
| 
      
 80 
     | 
    
         
            +
                end
         
     | 
| 
      
 81 
     | 
    
         
            +
            rescue LoadError => e
         
     | 
| 
      
 82 
     | 
    
         
            +
                require "#{direc}/ctexplay.#{dlext}"
         
     | 
| 
      
 83 
     | 
    
         
            +
            end
         
     | 
| 
      
 84 
     | 
    
         
            +
                
         
     | 
| 
      
 85 
     | 
    
         
            +
            require "#{direc}/texplay-contrib"
         
     | 
| 
      
 86 
     | 
    
         
            +
             
     | 
| 
      
 87 
     | 
    
         
            +
            # monkey patching the Gosu::Image class to add image manipulation functionality
         
     | 
| 
      
 88 
     | 
    
         
            +
            module Gosu
         
     | 
| 
      
 89 
     | 
    
         
            +
                class Image
         
     | 
| 
      
 90 
     | 
    
         
            +
             
     | 
| 
      
 91 
     | 
    
         
            +
                    # bring in the TexPlay image manipulation methods
         
     | 
| 
      
 92 
     | 
    
         
            +
                    include TexPlay
         
     | 
| 
      
 93 
     | 
    
         
            +
                    
         
     | 
| 
      
 94 
     | 
    
         
            +
                    class << self 
         
     | 
| 
      
 95 
     | 
    
         
            +
                        alias_method :original_new, :new
         
     | 
| 
      
 96 
     | 
    
         
            +
                        
         
     | 
| 
      
 97 
     | 
    
         
            +
                        def new(*args, &block)
         
     | 
| 
      
 98 
     | 
    
         
            +
             
     | 
| 
      
 99 
     | 
    
         
            +
                            # invoke old behaviour
         
     | 
| 
      
 100 
     | 
    
         
            +
                            obj = original_new(*args, &block)
         
     | 
| 
      
 101 
     | 
    
         
            +
             
     | 
| 
      
 102 
     | 
    
         
            +
                            # refresh the TexPlay image cache
         
     | 
| 
      
 103 
     | 
    
         
            +
                            if obj.width <= (TexPlay::TP_MAX_QUAD_SIZE - 2) &&
         
     | 
| 
      
 104 
     | 
    
         
            +
                                    obj.height <= (TexPlay::TP_MAX_QUAD_SIZE - 2) && obj.quad_cached? then
         
     | 
| 
      
 105 
     | 
    
         
            +
                                
         
     | 
| 
      
 106 
     | 
    
         
            +
                                obj.refresh_cache
         
     | 
| 
      
 107 
     | 
    
         
            +
                            end
         
     | 
| 
      
 108 
     | 
    
         
            +
             
     | 
| 
      
 109 
     | 
    
         
            +
                            # run custom setup
         
     | 
| 
      
 110 
     | 
    
         
            +
                            TexPlay::setup(obj)
         
     | 
| 
      
 111 
     | 
    
         
            +
             
     | 
| 
      
 112 
     | 
    
         
            +
                             obj.instance_variable_set(:@__window__, args.first)
         
     | 
| 
      
 113 
     | 
    
         
            +
             
     | 
| 
      
 114 
     | 
    
         
            +
                            # return the new image
         
     | 
| 
      
 115 
     | 
    
         
            +
                            obj
         
     | 
| 
      
 116 
     | 
    
         
            +
                        end
         
     | 
| 
      
 117 
     | 
    
         
            +
                    end
         
     | 
| 
      
 118 
     | 
    
         
            +
                    
         
     | 
| 
      
 119 
     | 
    
         
            +
                    def __window__
         
     | 
| 
      
 120 
     | 
    
         
            +
                        @__window__
         
     | 
| 
      
 121 
     | 
    
         
            +
                    end
         
     | 
| 
      
 122 
     | 
    
         
            +
                end
         
     | 
| 
      
 123 
     | 
    
         
            +
            end
         
     | 
| 
      
 124 
     | 
    
         
            +
             
     | 
| 
      
 125 
     | 
    
         
            +
            # a bug in ruby 1.8.6 rb_eval_string() means i must define this here (rather than in texplay.c)
         
     | 
| 
      
 126 
     | 
    
         
            +
            class Proc  
         
     | 
| 
      
 127 
     | 
    
         
            +
                def __context__
         
     | 
| 
      
 128 
     | 
    
         
            +
                    eval('self', self.binding)
         
     | 
| 
      
 129 
     | 
    
         
            +
                end
         
     | 
| 
      
 130 
     | 
    
         
            +
            end
         
     | 
| 
      
 131 
     | 
    
         
            +
             
     | 
| 
      
 132 
     | 
    
         
            +
             
     | 
| 
      
 133 
     | 
    
         
            +
             
     | 
| 
      
 134 
     | 
    
         
            +
             
     | 
    
        data/src/Makefile
    ADDED
    
    | 
         @@ -0,0 +1,181 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
             
     | 
| 
      
 2 
     | 
    
         
            +
            SHELL = /bin/sh
         
     | 
| 
      
 3 
     | 
    
         
            +
             
     | 
| 
      
 4 
     | 
    
         
            +
            #### Start of system configuration section. ####
         
     | 
| 
      
 5 
     | 
    
         
            +
             
     | 
| 
      
 6 
     | 
    
         
            +
            srcdir = .
         
     | 
| 
      
 7 
     | 
    
         
            +
            topdir = c:/ruby/lib/ruby/1.8/i386-mswin32
         
     | 
| 
      
 8 
     | 
    
         
            +
            hdrdir = $(topdir)
         
     | 
| 
      
 9 
     | 
    
         
            +
            VPATH = $(srcdir);$(topdir);$(hdrdir)
         
     | 
| 
      
 10 
     | 
    
         
            +
             
     | 
| 
      
 11 
     | 
    
         
            +
            DESTDIR = c:
         
     | 
| 
      
 12 
     | 
    
         
            +
            prefix = $(DESTDIR)/ruby
         
     | 
| 
      
 13 
     | 
    
         
            +
            exec_prefix = $(prefix)
         
     | 
| 
      
 14 
     | 
    
         
            +
            sitedir = $(prefix)/lib/ruby/site_ruby
         
     | 
| 
      
 15 
     | 
    
         
            +
            rubylibdir = $(libdir)/ruby/$(ruby_version)
         
     | 
| 
      
 16 
     | 
    
         
            +
            archdir = $(rubylibdir)/$(arch)
         
     | 
| 
      
 17 
     | 
    
         
            +
            sbindir = $(exec_prefix)/sbin
         
     | 
| 
      
 18 
     | 
    
         
            +
            datadir = $(prefix)/share
         
     | 
| 
      
 19 
     | 
    
         
            +
            includedir = $(prefix)/include
         
     | 
| 
      
 20 
     | 
    
         
            +
            infodir = $(prefix)/info
         
     | 
| 
      
 21 
     | 
    
         
            +
            sysconfdir = $(prefix)/etc
         
     | 
| 
      
 22 
     | 
    
         
            +
            mandir = $(prefix)/man
         
     | 
| 
      
 23 
     | 
    
         
            +
            libdir = $(exec_prefix)/lib
         
     | 
| 
      
 24 
     | 
    
         
            +
            sharedstatedir = $(DESTDIR)/etc
         
     | 
| 
      
 25 
     | 
    
         
            +
            oldincludedir = $(DESTDIR)/usr/include
         
     | 
| 
      
 26 
     | 
    
         
            +
            sitearchdir = $(sitelibdir)/$(sitearch)
         
     | 
| 
      
 27 
     | 
    
         
            +
            localstatedir = $(DESTDIR)/var
         
     | 
| 
      
 28 
     | 
    
         
            +
            bindir = $(exec_prefix)/bin
         
     | 
| 
      
 29 
     | 
    
         
            +
            sitelibdir = $(sitedir)/$(ruby_version)
         
     | 
| 
      
 30 
     | 
    
         
            +
            libexecdir = $(exec_prefix)/libexec
         
     | 
| 
      
 31 
     | 
    
         
            +
             
     | 
| 
      
 32 
     | 
    
         
            +
            CC = cl -nologo
         
     | 
| 
      
 33 
     | 
    
         
            +
            LIBRUBY = $(RUBY_SO_NAME).lib
         
     | 
| 
      
 34 
     | 
    
         
            +
            LIBRUBY_A = $(RUBY_SO_NAME)-static.lib
         
     | 
| 
      
 35 
     | 
    
         
            +
            LIBRUBYARG_SHARED = $(LIBRUBY)
         
     | 
| 
      
 36 
     | 
    
         
            +
            LIBRUBYARG_STATIC = $(LIBRUBY_A)
         
     | 
| 
      
 37 
     | 
    
         
            +
             
     | 
| 
      
 38 
     | 
    
         
            +
            RUBY_EXTCONF_H = 
         
     | 
| 
      
 39 
     | 
    
         
            +
            CFLAGS   =  -MD -Zi -O2b2xg- -G6 
         
     | 
| 
      
 40 
     | 
    
         
            +
            INCFLAGS = -I. -I. -Ic:/ruby/lib/ruby/1.8/i386-mswin32 -I.
         
     | 
| 
      
 41 
     | 
    
         
            +
            DEFS     = 
         
     | 
| 
      
 42 
     | 
    
         
            +
            CPPFLAGS =  
         
     | 
| 
      
 43 
     | 
    
         
            +
            CXXFLAGS = $(CFLAGS) 
         
     | 
| 
      
 44 
     | 
    
         
            +
            DLDFLAGS =  -link -incremental:no -debug -opt:ref -opt:icf -dll $(LIBPATH) -def:$(DEFFILE) -implib:$(*F:.so=)-$(arch).lib -pdb:$(*F:.so=)-$(arch).pdb 
         
     | 
| 
      
 45 
     | 
    
         
            +
            LDSHARED = cl -nologo -LD
         
     | 
| 
      
 46 
     | 
    
         
            +
            AR = lib -nologo
         
     | 
| 
      
 47 
     | 
    
         
            +
            EXEEXT = .exe
         
     | 
| 
      
 48 
     | 
    
         
            +
             
     | 
| 
      
 49 
     | 
    
         
            +
            RUBY_INSTALL_NAME = ruby
         
     | 
| 
      
 50 
     | 
    
         
            +
            RUBY_SO_NAME = msvcrt-ruby18
         
     | 
| 
      
 51 
     | 
    
         
            +
            arch = i386-mswin32
         
     | 
| 
      
 52 
     | 
    
         
            +
            sitearch = i386-msvcrt
         
     | 
| 
      
 53 
     | 
    
         
            +
            ruby_version = 1.8
         
     | 
| 
      
 54 
     | 
    
         
            +
            ruby = c:/ruby/bin/ruby
         
     | 
| 
      
 55 
     | 
    
         
            +
            RUBY = $(ruby:/=\)
         
     | 
| 
      
 56 
     | 
    
         
            +
            RM = $(RUBY) -run -e rm -- -f
         
     | 
| 
      
 57 
     | 
    
         
            +
            MAKEDIRS = @$(RUBY) -run -e mkdir -- -p
         
     | 
| 
      
 58 
     | 
    
         
            +
            INSTALL = @$(RUBY) -run -e install -- -vp
         
     | 
| 
      
 59 
     | 
    
         
            +
            INSTALL_PROG = $(INSTALL) -m 0755
         
     | 
| 
      
 60 
     | 
    
         
            +
            INSTALL_DATA = $(INSTALL) -m 0644
         
     | 
| 
      
 61 
     | 
    
         
            +
            COPY = copy > nul
         
     | 
| 
      
 62 
     | 
    
         
            +
             
     | 
| 
      
 63 
     | 
    
         
            +
            #### End of system configuration section. ####
         
     | 
| 
      
 64 
     | 
    
         
            +
             
     | 
| 
      
 65 
     | 
    
         
            +
            preload = 
         
     | 
| 
      
 66 
     | 
    
         
            +
             
     | 
| 
      
 67 
     | 
    
         
            +
            libpath = . $(libdir)
         
     | 
| 
      
 68 
     | 
    
         
            +
            LIBPATH =  -libpath:"." -libpath:"$(libdir)"
         
     | 
| 
      
 69 
     | 
    
         
            +
            DEFFILE = $(TARGET)-$(arch).def
         
     | 
| 
      
 70 
     | 
    
         
            +
             
     | 
| 
      
 71 
     | 
    
         
            +
            CLEANFILES = mkmf.log
         
     | 
| 
      
 72 
     | 
    
         
            +
            DISTCLEANFILES = vc*.pdb $(DEFFILE)
         
     | 
| 
      
 73 
     | 
    
         
            +
             
     | 
| 
      
 74 
     | 
    
         
            +
            extout = 
         
     | 
| 
      
 75 
     | 
    
         
            +
            extout_prefix = 
         
     | 
| 
      
 76 
     | 
    
         
            +
            target_prefix = 
         
     | 
| 
      
 77 
     | 
    
         
            +
            LOCAL_LIBS = 
         
     | 
| 
      
 78 
     | 
    
         
            +
            LIBS = $(LIBRUBYARG_SHARED) glut32.lib  oldnames.lib user32.lib advapi32.lib shell32.lib ws2_32.lib  
         
     | 
| 
      
 79 
     | 
    
         
            +
            SRCS = actions.c bindings.c cache.c gen_eval.c object2module.c texplay.c utils.c
         
     | 
| 
      
 80 
     | 
    
         
            +
            OBJS = actions.obj bindings.obj cache.obj gen_eval.obj object2module.obj texplay.obj utils.obj
         
     | 
| 
      
 81 
     | 
    
         
            +
            TARGET = ctexplay
         
     | 
| 
      
 82 
     | 
    
         
            +
            DLLIB = $(TARGET).so
         
     | 
| 
      
 83 
     | 
    
         
            +
            EXTSTATIC = 
         
     | 
| 
      
 84 
     | 
    
         
            +
            STATIC_LIB = 
         
     | 
| 
      
 85 
     | 
    
         
            +
             
     | 
| 
      
 86 
     | 
    
         
            +
            RUBYCOMMONDIR = $(sitedir)$(target_prefix)
         
     | 
| 
      
 87 
     | 
    
         
            +
            RUBYLIBDIR    = $(sitelibdir)$(target_prefix)
         
     | 
| 
      
 88 
     | 
    
         
            +
            RUBYARCHDIR   = $(sitearchdir)$(target_prefix)
         
     | 
| 
      
 89 
     | 
    
         
            +
             
     | 
| 
      
 90 
     | 
    
         
            +
            TARGET_SO     = $(DLLIB)
         
     | 
| 
      
 91 
     | 
    
         
            +
            CLEANLIBS     = $(TARGET).so $(TARGET).il? $(TARGET).tds $(TARGET).map
         
     | 
| 
      
 92 
     | 
    
         
            +
            CLEANOBJS     = *.obj *.lib *.s[ol] *.pdb *.exp *.bak
         
     | 
| 
      
 93 
     | 
    
         
            +
             
     | 
| 
      
 94 
     | 
    
         
            +
            all:		$(DLLIB)
         
     | 
| 
      
 95 
     | 
    
         
            +
            static:		$(STATIC_LIB)
         
     | 
| 
      
 96 
     | 
    
         
            +
             
     | 
| 
      
 97 
     | 
    
         
            +
            clean:
         
     | 
| 
      
 98 
     | 
    
         
            +
            		@-$(RM) $(CLEANLIBS:/=\) $(CLEANOBJS:/=\) $(CLEANFILES:/=\)
         
     | 
| 
      
 99 
     | 
    
         
            +
             
     | 
| 
      
 100 
     | 
    
         
            +
            distclean:	clean
         
     | 
| 
      
 101 
     | 
    
         
            +
            		@-$(RM) Makefile $(RUBY_EXTCONF_H) conftest.* mkmf.log
         
     | 
| 
      
 102 
     | 
    
         
            +
            		@-$(RM) core ruby$(EXEEXT) *~ $(DISTCLEANFILES:/=\)
         
     | 
| 
      
 103 
     | 
    
         
            +
             
     | 
| 
      
 104 
     | 
    
         
            +
            realclean:	distclean
         
     | 
| 
      
 105 
     | 
    
         
            +
            install: install-so install-rb
         
     | 
| 
      
 106 
     | 
    
         
            +
             
     | 
| 
      
 107 
     | 
    
         
            +
            install-so: $(RUBYARCHDIR)
         
     | 
| 
      
 108 
     | 
    
         
            +
            install-so: $(RUBYARCHDIR)/$(DLLIB)
         
     | 
| 
      
 109 
     | 
    
         
            +
            $(RUBYARCHDIR)/$(DLLIB): $(DLLIB)
         
     | 
| 
      
 110 
     | 
    
         
            +
            	$(INSTALL_PROG) $(DLLIB:/=\) $(RUBYARCHDIR:/=\)
         
     | 
| 
      
 111 
     | 
    
         
            +
            install-rb: pre-install-rb install-rb-default
         
     | 
| 
      
 112 
     | 
    
         
            +
            install-rb-default: pre-install-rb-default
         
     | 
| 
      
 113 
     | 
    
         
            +
            pre-install-rb: Makefile
         
     | 
| 
      
 114 
     | 
    
         
            +
            pre-install-rb-default: Makefile
         
     | 
| 
      
 115 
     | 
    
         
            +
            $(RUBYARCHDIR):
         
     | 
| 
      
 116 
     | 
    
         
            +
            	$(MAKEDIRS) $@
         
     | 
| 
      
 117 
     | 
    
         
            +
             
     | 
| 
      
 118 
     | 
    
         
            +
            site-install: site-install-so site-install-rb
         
     | 
| 
      
 119 
     | 
    
         
            +
            site-install-so: install-so
         
     | 
| 
      
 120 
     | 
    
         
            +
            site-install-rb: install-rb
         
     | 
| 
      
 121 
     | 
    
         
            +
             
     | 
| 
      
 122 
     | 
    
         
            +
            .SUFFIXES: .c .m .cc .cxx .cpp .obj
         
     | 
| 
      
 123 
     | 
    
         
            +
             
     | 
| 
      
 124 
     | 
    
         
            +
            {$(srcdir)}.cc{}.obj:
         
     | 
| 
      
 125 
     | 
    
         
            +
            	$(CXX) $(INCFLAGS) $(CXXFLAGS) $(CPPFLAGS) -c -Tp$(<:\=/)
         
     | 
| 
      
 126 
     | 
    
         
            +
             
     | 
| 
      
 127 
     | 
    
         
            +
            {$(topdir)}.cc{}.obj:
         
     | 
| 
      
 128 
     | 
    
         
            +
            	$(CXX) $(INCFLAGS) $(CXXFLAGS) $(CPPFLAGS) -c -Tp$(<:\=/)
         
     | 
| 
      
 129 
     | 
    
         
            +
             
     | 
| 
      
 130 
     | 
    
         
            +
            {$(hdrdir)}.cc{}.obj:
         
     | 
| 
      
 131 
     | 
    
         
            +
            	$(CXX) $(INCFLAGS) $(CXXFLAGS) $(CPPFLAGS) -c -Tp$(<:\=/)
         
     | 
| 
      
 132 
     | 
    
         
            +
             
     | 
| 
      
 133 
     | 
    
         
            +
            .cc.obj:
         
     | 
| 
      
 134 
     | 
    
         
            +
            	$(CXX) $(INCFLAGS) $(CXXFLAGS) $(CPPFLAGS) -c -Tp$(<:\=/)
         
     | 
| 
      
 135 
     | 
    
         
            +
             
     | 
| 
      
 136 
     | 
    
         
            +
            {$(srcdir)}.cxx{}.obj:
         
     | 
| 
      
 137 
     | 
    
         
            +
            	$(CXX) $(INCFLAGS) $(CXXFLAGS) $(CPPFLAGS) -c -Tp$(<:\=/)
         
     | 
| 
      
 138 
     | 
    
         
            +
             
     | 
| 
      
 139 
     | 
    
         
            +
            {$(topdir)}.cxx{}.obj:
         
     | 
| 
      
 140 
     | 
    
         
            +
            	$(CXX) $(INCFLAGS) $(CXXFLAGS) $(CPPFLAGS) -c -Tp$(<:\=/)
         
     | 
| 
      
 141 
     | 
    
         
            +
             
     | 
| 
      
 142 
     | 
    
         
            +
            {$(hdrdir)}.cxx{}.obj:
         
     | 
| 
      
 143 
     | 
    
         
            +
            	$(CXX) $(INCFLAGS) $(CXXFLAGS) $(CPPFLAGS) -c -Tp$(<:\=/)
         
     | 
| 
      
 144 
     | 
    
         
            +
             
     | 
| 
      
 145 
     | 
    
         
            +
            .cxx.obj:
         
     | 
| 
      
 146 
     | 
    
         
            +
            	$(CXX) $(INCFLAGS) $(CXXFLAGS) $(CPPFLAGS) -c -Tp$(<:\=/)
         
     | 
| 
      
 147 
     | 
    
         
            +
             
     | 
| 
      
 148 
     | 
    
         
            +
            {$(srcdir)}.cpp{}.obj:
         
     | 
| 
      
 149 
     | 
    
         
            +
            	$(CXX) $(INCFLAGS) $(CXXFLAGS) $(CPPFLAGS) -c -Tp$(<:\=/)
         
     | 
| 
      
 150 
     | 
    
         
            +
             
     | 
| 
      
 151 
     | 
    
         
            +
            {$(topdir)}.cpp{}.obj:
         
     | 
| 
      
 152 
     | 
    
         
            +
            	$(CXX) $(INCFLAGS) $(CXXFLAGS) $(CPPFLAGS) -c -Tp$(<:\=/)
         
     | 
| 
      
 153 
     | 
    
         
            +
             
     | 
| 
      
 154 
     | 
    
         
            +
            {$(hdrdir)}.cpp{}.obj:
         
     | 
| 
      
 155 
     | 
    
         
            +
            	$(CXX) $(INCFLAGS) $(CXXFLAGS) $(CPPFLAGS) -c -Tp$(<:\=/)
         
     | 
| 
      
 156 
     | 
    
         
            +
             
     | 
| 
      
 157 
     | 
    
         
            +
            .cpp.obj:
         
     | 
| 
      
 158 
     | 
    
         
            +
            	$(CXX) $(INCFLAGS) $(CXXFLAGS) $(CPPFLAGS) -c -Tp$(<:\=/)
         
     | 
| 
      
 159 
     | 
    
         
            +
             
     | 
| 
      
 160 
     | 
    
         
            +
            {$(srcdir)}.c{}.obj:
         
     | 
| 
      
 161 
     | 
    
         
            +
            	$(CC) $(INCFLAGS) $(CFLAGS) $(CPPFLAGS) -c -Tc$(<:\=/)
         
     | 
| 
      
 162 
     | 
    
         
            +
             
     | 
| 
      
 163 
     | 
    
         
            +
            {$(topdir)}.c{}.obj:
         
     | 
| 
      
 164 
     | 
    
         
            +
            	$(CC) $(INCFLAGS) $(CFLAGS) $(CPPFLAGS) -c -Tc$(<:\=/)
         
     | 
| 
      
 165 
     | 
    
         
            +
             
     | 
| 
      
 166 
     | 
    
         
            +
            {$(hdrdir)}.c{}.obj:
         
     | 
| 
      
 167 
     | 
    
         
            +
            	$(CC) $(INCFLAGS) $(CFLAGS) $(CPPFLAGS) -c -Tc$(<:\=/)
         
     | 
| 
      
 168 
     | 
    
         
            +
             
     | 
| 
      
 169 
     | 
    
         
            +
            .c.obj:
         
     | 
| 
      
 170 
     | 
    
         
            +
            	$(CC) $(INCFLAGS) $(CFLAGS) $(CPPFLAGS) -c -Tc$(<:\=/)
         
     | 
| 
      
 171 
     | 
    
         
            +
             
     | 
| 
      
 172 
     | 
    
         
            +
            $(DLLIB): $(DEFFILE) $(OBJS)
         
     | 
| 
      
 173 
     | 
    
         
            +
            	@-$(RM) $@
         
     | 
| 
      
 174 
     | 
    
         
            +
            	$(LDSHARED) -Fe$(@) $(OBJS) $(LIBS) $(LOCAL_LIBS) $(DLDFLAGS)
         
     | 
| 
      
 175 
     | 
    
         
            +
             
     | 
| 
      
 176 
     | 
    
         
            +
             
     | 
| 
      
 177 
     | 
    
         
            +
             
     | 
| 
      
 178 
     | 
    
         
            +
            $(DEFFILE): 
         
     | 
| 
      
 179 
     | 
    
         
            +
            	$(RUBY) -e "puts 'EXPORTS', 'Init_$(TARGET)'"  > $@
         
     | 
| 
      
 180 
     | 
    
         
            +
             
     | 
| 
      
 181 
     | 
    
         
            +
            $(OBJS): {.;$(srcdir);$(topdir);$(hdrdir)}ruby.h {.;$(srcdir);$(topdir);$(hdrdir)}defines.h
         
     |