shattered_pack 0.4.0.1 → 0.5.0.1

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.
Files changed (34) hide show
  1. data/lib/shattered_model.rb +1 -4
  2. data/lib/shattered_pack/base.rb +1 -1
  3. data/lib/shattered_pack/keyboard_input/key_converter.rb +3 -3
  4. data/lib/shattered_pack/keyboard_input/keyboard_input.rb +3 -1
  5. data/lib/shattered_pack/pre_initialize/pre_initialize.rb +6 -1
  6. data/lib/shattered_pack.rb +2 -5
  7. data/lib/shattered_state/actor/actor.rb +5 -1
  8. data/lib/shattered_state/base.rb +31 -16
  9. data/lib/shattered_state.rb +1 -4
  10. data/lib/shattered_view/base.rb +106 -41
  11. data/lib/shattered_view/camera.rb +7 -7
  12. data/lib/shattered_view/resources.rb +18 -2
  13. data/lib/shattered_view.rb +3 -5
  14. metadata +10 -29
  15. data/lib/mock_objects/shattered_ogre/input.rb +0 -6
  16. data/lib/mock_objects/shattered_ogre/light.rb +0 -4
  17. data/lib/mock_objects/shattered_ogre/mesh.rb +0 -17
  18. data/lib/mock_objects/shattered_ogre/node.rb +0 -17
  19. data/lib/mock_objects/shattered_ogre/renderer.rb +0 -11
  20. data/lib/mock_objects/shattered_ogre/resource_handler.rb +0 -9
  21. data/lib/mock_objects/shattered_ogre/scene.rb +0 -28
  22. data/lib/shattered_model/fuzzy_logic.rb +0 -188
  23. data/lib/shattered_model/linear_interpolator.rb +0 -29
  24. data/lib/shattered_pack/runner.rb +0 -11
  25. data/lib/shattered_state/runner.rb +0 -39
  26. data/lib/shattered_view/extensions.rb +0 -10
  27. data/lib/shattered_view/light.rb +0 -29
  28. data/lib/shattered_view/mesh/animation.rb +0 -20
  29. data/lib/shattered_view/mesh/mesh.rb +0 -152
  30. data/lib/shattered_view/node.rb +0 -105
  31. data/lib/shattered_view/overlay.rb +0 -20
  32. data/lib/shattered_view/rmaterial.rb +0 -43
  33. data/lib/shattered_view/runner.rb +0 -48
  34. data/lib/shattered_view/vector.rb +0 -258
@@ -1,4 +1 @@
1
- %w(base fuzzy_logic linear_interpolator).each do |dependency|
2
- dependency = "shattered_model/#{dependency}"
3
- require dependency
4
- end
1
+ require 'shattered_model/base'
@@ -22,7 +22,7 @@ module ShatteredPack #:nodoc:
22
22
 
23
23
  # Retrieve the current state
24
24
  def state
25
- Configuration.environment[:state]
25
+ Shatter::GameLoader.instance.current_state
26
26
  end
27
27
 
28
28
  # TODO - is this called anymore?
@@ -8,7 +8,7 @@ module ShatteredPack
8
8
  end
9
9
 
10
10
  def key_event?( type, key_symbol )
11
- ogre_key_method = "isKey#{type.to_s.capitalize}".to_sym
11
+ ogre_key_method = "key_#{type.to_s}?".to_sym
12
12
  return @ogre_input.send(ogre_key_method, self.class.convert(key_symbol))
13
13
  end
14
14
 
@@ -26,8 +26,8 @@ module ShatteredPack
26
26
  rescue NameError
27
27
  end
28
28
  @@conversions = {}
29
- ShatteredOgre.constants.each do |constant|
30
- kc_evaled = eval("ShatteredOgre::#{constant}")
29
+ OIS.constants.each do |constant|
30
+ kc_evaled = eval("OIS::#{constant}")
31
31
  @@conversions[kc_evaled] = symbolize(constant[3..-1].downcase) if constant.to_s =~ /^KC_/
32
32
  end
33
33
  return @@conversions
@@ -38,8 +38,10 @@ module ShatteredPack
38
38
  module InstanceMethods
39
39
  def pre_initialize(options)
40
40
  # update our keyboard input
41
+ key_converter = Shatter::GameLoader.instance.key_converter
41
42
  timer.every(:frame) do |time_elapsed|
42
- update_input(time_elapsed, ShatteredState::Runner.environment[:input])
43
+ #TODO: the environment needs to go away - and the input needs to be grabbed from OIS.
44
+ update_input(time_elapsed, key_converter)
43
45
  end
44
46
  super
45
47
  end
@@ -80,6 +80,7 @@ module ShatteredPack
80
80
  end
81
81
  end
82
82
 
83
+ # TODO: This is bad - this method needs to be refactored and/or nuked.
83
84
  def call_object_function(actor, action, params, evaluate_symbols=true)
84
85
  begin
85
86
  if params.is_a?(Symbol) && evaluate_symbols
@@ -90,7 +91,11 @@ module ShatteredPack
90
91
  puts " It will try to be evaluated. Use a string instead."
91
92
  end
92
93
  begin
93
- sendee = eval(actor.to_s)
94
+ if(actor.is_a?(String) || actor.is_a?(Symbol))
95
+ sendee = eval(actor.to_s)
96
+ else
97
+ sendee = actor
98
+ end
94
99
  if(params.is_a? Array)
95
100
  sendee.send( action.to_sym, *params )
96
101
  else
@@ -1,12 +1,9 @@
1
1
  $: << File.expand_path(File.dirname(__FILE__))
2
2
 
3
- %w( base runner ).each do |component|
4
- dependency = "shattered_pack/#{component}"
5
- require dependency
6
- end
3
+ require "shattered_pack/base"
7
4
 
8
5
  require 'shattered_support'
9
- require 'shattered_ogre'
6
+ require 'shattered_ogrerb'
10
7
  require 'shattered_model'
11
8
  require 'shattered_view'
12
9
  require 'shattered_state'
@@ -53,11 +53,15 @@ module ShatteredState
53
53
  unless created_by_meta_function
54
54
  raise Error, "Use #{name.to_s.camelize}.new instead of actor :#{name} at the instance level"
55
55
  end
56
+ # Find our actor class using eval (yay)
56
57
  begin
57
- actor = eval(name.to_s.camelize).new(options)
58
+ actor_class = eval(name.to_s.camelize)
58
59
  rescue NameError
59
60
  raise Error, "Actor #{name.to_s.camelize} is not defined."
60
61
  end
62
+
63
+ # create a new instance of our actor class, and make it accessible to the creator
64
+ actor = actor_class.new(options)
61
65
  attr_reader(name.to_sym, actor)
62
66
 
63
67
  return actor
@@ -26,14 +26,9 @@ module ShatteredState
26
26
  # The valid options are any public functions within camera that ends in =
27
27
  # (such as position=, looking_at=) See ShatteredView::Camera for more.
28
28
  def camera(options = {})
29
- before_init_call( 'camera', options )
29
+ #before_init_call( 'camera', options )
30
30
  end
31
31
 
32
- # This blurs the lines between view and controller.
33
- # Valid types are [:box]
34
- def sky(type, options = {})
35
- before_init_set( "self", { :sky => [type, options[:material]] })
36
- end
37
32
  end
38
33
  # State is the entry point for your shattered game.
39
34
  #
@@ -41,10 +36,10 @@ module ShatteredState
41
36
  # You can choose your starting state in config/environment.rb
42
37
  class Base < ShatteredPack::Base
43
38
  before_init_call :activate_state
44
- attr_reader :actors
39
+ attr_reader :actors, :scene_manager
45
40
 
46
41
  def activate_state #:nodoc:
47
- ShatteredPack::Configuration.environment[:state] = self
42
+ Shatter::GameLoader.instance.current_state = self
48
43
  @actors = []
49
44
  end
50
45
 
@@ -55,30 +50,50 @@ module ShatteredState
55
50
  self.time_elapsed = time_elapsed
56
51
  timer.update(time_elapsed)
57
52
  end
53
+
54
+ # The main method for creating new objects,
55
+ # IE: create(:light)
56
+ def create(type, *args)
57
+ name = nil
58
+ name = args[0] unless args.empty?
59
+
60
+ object = self.send(:"create_#{type}", name)
61
+ return object
62
+ end
58
63
 
59
64
  # Returns the camera used in the state. See ShatteredState::ClassMethods#camera
60
65
  def camera(*args)
61
66
  if args.length == 0
62
- return @camera ||= Runner.environment[:camera]
67
+ # TODO: We now need to create a camera using Ogre, and bind it
68
+ # return @camera ||= Runner.environment[:camera]
69
+ return {}
63
70
  end
64
71
 
65
72
  options = args[0]
66
73
 
67
74
  # Cameras are special, in that we have to have the position
68
75
  # called before looking_at or the view matrix gets way messed up
69
- call_object_function :camera, :position=, options.delete(:position) if options.has_key?(:position)
70
- call_object_function :camera, :looking_at=, options.delete(:looking_at) if options.has_key?(:looking_at)
76
+ # TODO: replace with create(:camera)
77
+ # call_object_function :camera, :position=, options.delete(:position) if options.has_key?(:position)
78
+ # call_object_function :camera, :looking_at=, options.delete(:looking_at) if options.has_key?(:looking_at)
71
79
 
72
80
  # Call the other methods
73
- call_object_function_for_each_key(:camera, options)
81
+ # TODO: uncomment when camera is populated
82
+ # call_object_function_for_each_key(:camera, options)
74
83
  end
75
84
 
76
- def sky=(type, material) #:nodoc:
77
- Runner.environment[:scene].send("setSky#{type.to_s.capitalize}",material)
78
- end
85
+ # Creates a scene manager for Ogre to use.
86
+ def create_scene_manager(type)
87
+ root = Ogre::Root.instance
88
+ @scene_manager = root.create_scene_manager(ShatteredOgre.translate_to_scene_type(type), "#{root.to_s}.scene_manager(#{type})")
89
+ end
90
+
91
+ def create_viewport(camera)
92
+ Shatter::GameLoader.instance.render_window.add_viewport(camera)
93
+ end
79
94
 
80
95
  def quit
81
- Runner.environment[:quit]=true
96
+ Shatter::GameLoader.instance.quit!
82
97
  end
83
98
  end
84
99
 
@@ -1,4 +1 @@
1
- %w(runner base).each do |dependency|
2
- dependency = "shattered_state/#{dependency}"
3
- require dependency
4
- end
1
+ require 'shattered_state/base'
@@ -2,8 +2,6 @@
2
2
  $:.unshift(File.dirname(__FILE__)) unless
3
3
  $:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__)))
4
4
 
5
- require 'mesh/mesh'
6
-
7
5
  module ShatteredView #:nodoc:
8
6
 
9
7
  class Error < StandardError; end
@@ -18,17 +16,42 @@ module ShatteredView #:nodoc:
18
16
  # metafunction is called.
19
17
  #
20
18
  # Example:
21
- # material :wall_material, :template => 'normal_map', :texture => 'wall.png', :normal => 'brick_normals.png', :tangent_space => true
19
+ # material :wall_material, :template => 'normal_map', :texture => 'wall.png', :normal => 'brick_normals.png'
22
20
  # mesh :wall, :material => :wall_material
23
21
  #
24
- # You must make sure that your material name is unique, or Ogre will fail.
22
+ # Materials that share the same name will be the same references.
25
23
  #
26
- # All rmaterial files are included within media/templates, you can add your own there.
27
- # TODO: ruby script/generate material (?)
24
+ # All rmaterial files are included within a media path, you can add your own there.
28
25
  def material(name, options = {})
29
- before_init_set "self", {:new_material => [name]}
30
- before_init_set name, options
31
- before_init_set name, {:create_ogre_material => []}
26
+ # This is a two step process - first the rmaterials are created.
27
+ before_init_call :dsl_create, :material, name, options
28
+ # Secondly, the rmaterials become Ogre::Materials, and are accessed as such.
29
+ before_init_call :dsl_create, :material_from_rmaterial, name, {}
30
+ end
31
+
32
+ # Meshes are the foundation for your world.
33
+ #
34
+ # They tie in to Ogre's .mesh file format, and display a 3d object onto the screen.
35
+ #
36
+ # Shattered has support for loading meshes, creating materials for those meshes (using RMaterials)
37
+ # and skeletal animation support.
38
+ #
39
+ # class DirtyRubyView
40
+ # mesh "dirty_ruby", :position => v(0,0,1)
41
+ # end
42
+ #
43
+ # When a Mesh is created, all animations found in that mesh are loaded, and added
44
+ # as functions to that mesh.
45
+ #
46
+ # example: Tim.mesh has animations kick and punch
47
+ #
48
+ # after loading Tim.mesh, View has the Mesh object tim
49
+ # tim.kick.play
50
+ # tim.animation(:kick).play
51
+ #
52
+ # See Rmaterials and Animation for more details.
53
+ def mesh(name, options = {})
54
+ before_init_call :dsl_create, :mesh, name, options
32
55
  end
33
56
 
34
57
 
@@ -61,8 +84,7 @@ module ShatteredView #:nodoc:
61
84
  # Example: light :flashlight...
62
85
 
63
86
  def light(name, options = {})
64
- before_init_set "self", {:new_light => [name]}
65
- before_init_set name, options
87
+ before_init_call :dsl_create, :light, name, options
66
88
  end
67
89
 
68
90
  # The following is not yet implemented:
@@ -80,8 +102,16 @@ module ShatteredView #:nodoc:
80
102
 
81
103
  class Base < ShatteredPack::Base
82
104
  attr_accessor :controller, :model
83
- attr_reader :lights
84
-
105
+ attr_reader :lights, :children, :meshes
106
+
107
+ before_init_call "setup_variables"
108
+
109
+ def setup_variables
110
+ @children = []
111
+ @lights = []
112
+ @meshes = []
113
+ end
114
+
85
115
  def visible=(visible)
86
116
  node.visible=(visible)
87
117
  end
@@ -90,16 +120,6 @@ module ShatteredView #:nodoc:
90
120
  node.rotate(vector, amount)
91
121
  end
92
122
 
93
- def new_material=(name)
94
- @materials ||= {}
95
- name = name.to_sym
96
- @materials[name] = RMaterial.new
97
- @materials[name].name=name
98
- self.class.send(:define_method, name) do
99
- @materials[name]
100
- end
101
- end
102
-
103
123
  def define_accessor(array, new_obj, name)
104
124
  instance_eval("#{array} ||= {}")
105
125
  instance_eval("#{array}[\"#{name}\"] = new_obj")
@@ -111,26 +131,74 @@ module ShatteredView #:nodoc:
111
131
  EOF
112
132
  end
113
133
 
114
- def new_light=(name)
115
- #define_accessor("@lights", ShatteredView::Light.new, name)
116
- @lights ||= {}
117
- name = name.to_sym
118
- @lights[name] = Light.new
134
+ def scene_manager
135
+ return state.scene_manager
136
+ end
137
+
138
+ def dsl_create(type, *args)
139
+ name, options = args
140
+ create(type, *args)
141
+
142
+ index = @children.length-1
143
+ # Create an accessor for the light
119
144
  self.class.send(:define_method, name) do
120
- @lights[name]
145
+ @children[index]
121
146
  end
147
+ call_object_function_for_each_key(@children[index], options)
148
+ end
149
+
150
+ # The main method for creating new view objects,
151
+ # IE: create(:light)
152
+ def create(type, *args)
153
+ object = self.send(:"create_#{type}", *args)
154
+ @children << object
155
+ return object
122
156
  end
157
+
158
+ #Create a light and add it to the lights array
159
+ def create_light(name, options)
160
+ light_number = @lights.length
161
+ light = scene_manager.create_light("#{self.to_s}.light(#{light_number})")
162
+ @lights << light
163
+ return light
164
+ end
165
+
166
+ #Creates a mesh and adds it to the mesh array
167
+ def create_mesh(name, options)
168
+ mesh = Ogre::MeshInstance.new(node, scene_manager, name.to_s+".mesh")
169
+ @meshes << mesh
170
+ return mesh
171
+ end
172
+
173
+ #Create a node using the view's node as a parent
174
+ def create_node(name, options)
175
+ node.create_child_scene_node
176
+ end
177
+
178
+ #Create a material and add it to the materials array
179
+ def create_material(name, options)
180
+ @materials ||= {}
181
+ #pull the rmaterial from any resource path
182
+ file = Resources.instance.find_file("#{options[:template]}.rmaterial")
183
+ name = name.to_sym
184
+
185
+ @materials[name] = Ogre::RMaterial.new(file)
186
+ @materials[name].name = name
187
+ return @materials[name]
188
+ end
189
+
190
+ # Changes an RMaterial into a Ogre::Material
191
+ def create_material_from_rmaterial(name, options)
192
+ name = name.to_sym
193
+ @materials[name].parse!
194
+ @materials[name] = @materials[name].create_ogre_material!
195
+ return @materials[name]
196
+ end
123
197
 
124
198
  def new_particle_system=(name, template)
125
199
  define_accessor("@particle_systems", ShatteredView::ParticleSystem.new(template), name)
126
200
  end
127
-
128
-
129
- #Return all of the children attached to this view's scene node
130
- def children
131
- node.children
132
- end
133
-
201
+
134
202
  def position
135
203
  node.position
136
204
  end
@@ -144,7 +212,7 @@ module ShatteredView #:nodoc:
144
212
  end
145
213
 
146
214
  def node
147
- @scene_node ||= Node.new(Node.root)
215
+ @scene_node ||= scene_manager.root_scene_node.create_child_scene_node
148
216
  end
149
217
 
150
218
  private
@@ -157,7 +225,4 @@ module ShatteredView #:nodoc:
157
225
  end
158
226
 
159
227
 
160
- ShatteredView::Base.class_eval do
161
- include ShatteredView::Mesh
162
- end
163
-
228
+
@@ -1,7 +1,7 @@
1
- module ShatteredView
2
- class Camera < Node
3
- def initialize( scene )
4
- @scene_node = scene.getCamera
5
- end
6
- end
7
- end
1
+ #module ShatteredView
2
+ # class Camera < Node
3
+ # def initialize( scene )
4
+ # @scene_node = scene.getCamera
5
+ # end
6
+ # end
7
+ # end
@@ -14,14 +14,24 @@ module ShatteredView
14
14
 
15
15
  def add_resource_paths(*paths)
16
16
  paths.each do |path|
17
+ next if path.nil?
17
18
  path = SHATTERED_ROOT + "/"+path
18
19
  @resource_paths << path
19
- each_directory_in_path(path) do |sub_path|
20
- ShatteredOgre::ResourceHandler.getSingleton.addResourcePath(sub_path) unless defined? TESTING
20
+ each_directory_in_path(path) do |sub_path|
21
+ Ogre::ResourceGroupManager.instance.add_resource_location(sub_path, "FileSystem", "General")
21
22
  end
22
23
  end
23
24
  end
24
25
 
26
+ # Called once all resource groups have been added
27
+ def setup
28
+ begin
29
+ Ogre::ResourceGroupManager::instance.initialise_all_resource_groups
30
+ rescue StandardError => bang
31
+ puts "WARNING #{bang.message}"
32
+ end
33
+ end
34
+
25
35
  def destroy_paths
26
36
  @resource_paths = []
27
37
  end
@@ -43,5 +53,11 @@ module ShatteredView
43
53
  def each_directory_in_path(path,&block)
44
54
  Dir.each_in_path(path, &block)
45
55
  end
56
+
57
+ # find a particular file in the resource paths
58
+ def find_file(filename)
59
+ File.find(@resource_paths, filename)
60
+ end
61
+
46
62
  end
47
63
  end
@@ -1,8 +1,6 @@
1
- require 'shattered_ogre'
1
+ require 'shattered_ogrerb'
2
2
  require 'shattered_pack'
3
- raise( ShatteredPack::Error, "Could not find ShatteredOgre (a ShatteredView dependency)" ) unless defined? ShatteredOgre
4
3
 
5
- %w(vector utilities node camera overlay light extensions runner rmaterial base resources).each do |dependency|
6
- dependency = "shattered_view/#{dependency}"
7
- require dependency
4
+ Dir[File.dirname(__FILE__)+"/shattered_view/**/*.rb"].each do |dependency|
5
+ require dependency
8
6
  end
metadata CHANGED
@@ -1,10 +1,10 @@
1
1
  --- !ruby/object:Gem::Specification
2
- rubygems_version: 0.8.11
2
+ rubygems_version: 0.9.4
3
3
  specification_version: 1
4
4
  name: shattered_pack
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.4.0.1
7
- date: 2006-09-12 00:00:00 -06:00
6
+ version: 0.5.0.1
7
+ date: 2007-06-22 00:00:00 -06:00
8
8
  summary: "Shattered Pack: The combination of model/view/controllers and the domain specific language for each."
9
9
  require_paths:
10
10
  - lib
@@ -25,47 +25,28 @@ required_ruby_version: !ruby/object:Gem::Version::Requirement
25
25
  platform: ruby
26
26
  signing_key:
27
27
  cert_chain:
28
+ post_install_message:
28
29
  authors: []
29
30
 
30
31
  files:
31
32
  - lib/mock_objects.rb
32
- - lib/shattered_model.rb
33
- - lib/shattered_pack.rb
34
- - lib/shattered_state.rb
35
- - lib/shattered_view.rb
36
- - lib/mock_objects/shattered_ogre/input.rb
37
- - lib/mock_objects/shattered_ogre/light.rb
38
- - lib/mock_objects/shattered_ogre/mesh.rb
39
- - lib/mock_objects/shattered_ogre/node.rb
40
- - lib/mock_objects/shattered_ogre/renderer.rb
41
- - lib/mock_objects/shattered_ogre/resource_handler.rb
42
- - lib/mock_objects/shattered_ogre/scene.rb
43
33
  - lib/shattered_model/base.rb
44
- - lib/shattered_model/fuzzy_logic.rb
45
- - lib/shattered_model/linear_interpolator.rb
34
+ - lib/shattered_model.rb
46
35
  - lib/shattered_pack/base.rb
47
- - lib/shattered_pack/runner.rb
48
- - lib/shattered_pack/keyboard_input/key_converter.rb
49
36
  - lib/shattered_pack/keyboard_input/keyboard_input.rb
37
+ - lib/shattered_pack/keyboard_input/key_converter.rb
50
38
  - lib/shattered_pack/pre_initialize/pre_initialize.rb
51
39
  - lib/shattered_pack/timer/timed_event.rb
52
40
  - lib/shattered_pack/timer/timer.rb
53
- - lib/shattered_state/base.rb
54
- - lib/shattered_state/runner.rb
41
+ - lib/shattered_pack.rb
55
42
  - lib/shattered_state/actor/actor.rb
43
+ - lib/shattered_state/base.rb
44
+ - lib/shattered_state.rb
56
45
  - lib/shattered_view/base.rb
57
46
  - lib/shattered_view/camera.rb
58
- - lib/shattered_view/extensions.rb
59
- - lib/shattered_view/light.rb
60
- - lib/shattered_view/node.rb
61
- - lib/shattered_view/overlay.rb
62
47
  - lib/shattered_view/resources.rb
63
- - lib/shattered_view/rmaterial.rb
64
- - lib/shattered_view/runner.rb
65
48
  - lib/shattered_view/utilities.rb
66
- - lib/shattered_view/vector.rb
67
- - lib/shattered_view/mesh/animation.rb
68
- - lib/shattered_view/mesh/mesh.rb
49
+ - lib/shattered_view.rb
69
50
  test_files: []
70
51
 
71
52
  rdoc_options: []
@@ -1,6 +0,0 @@
1
- module ShatteredOgre
2
- class Input
3
- def initialize
4
- end
5
- end
6
- end
@@ -1,4 +0,0 @@
1
- module ShatteredOgre
2
- class Light
3
- end
4
- end
@@ -1,17 +0,0 @@
1
- module ShatteredOgre # :nodoc:all
2
- class Mesh
3
- def initialize(file_name)
4
- end
5
- def getPosition
6
- v(0,0,0)
7
- end
8
- def setPosition(x)
9
- end
10
- def getNumberOfAnimations
11
- 0
12
- end
13
- def setMaterial(material)
14
- end
15
-
16
- end
17
- end
@@ -1,17 +0,0 @@
1
- module ShatteredOgre #:nodoc:all
2
- class Node
3
- def attachTo(object)
4
- end
5
- def createChildNode()
6
- end
7
- def setPosition(v)
8
- end
9
- def scale(amount)
10
- end
11
- def setVisible(vis)
12
- end
13
- def rotate(axis, amount)
14
- end
15
-
16
- end
17
- end
@@ -1,11 +0,0 @@
1
- module ShatteredOgre
2
- class Renderer
3
- def initialize
4
- end
5
- def failed
6
- false
7
- end
8
- def nextFrame
9
- end
10
- end
11
- end
@@ -1,9 +0,0 @@
1
- module ShatteredOgre
2
- class ResourceHandler
3
- def self.getSingleton
4
- @@resource_handler ||= ResourceHandler.new
5
- end
6
- def addCustomMaterial(name, material)
7
- end
8
- end
9
- end
@@ -1,28 +0,0 @@
1
- module ShatteredOgre
2
- class Scene
3
- def initialize(*args)
4
- end
5
- def createMesh(*args)
6
- Mesh.new("fake")
7
- end
8
- def self.getSingleton
9
- new
10
- end
11
- def createSceneNode
12
- Node.new
13
- end
14
- def getRootSceneNode
15
- Node.new
16
- end
17
- def createLight
18
- ShatteredOgre::Light.new
19
- end
20
- def hideOverlay(name)
21
- end
22
- def showOverlay(name)
23
- end
24
- def getCamera
25
- Node.new
26
- end
27
- end
28
- end