SOURCES: Slune-soya.patch (NEW) - really fix new soya api

shadzik shadzik at pld-linux.org
Sun Sep 24 15:24:20 CEST 2006


Author: shadzik                      Date: Sun Sep 24 13:24:20 2006 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- really fix new soya api

---- Files affected:
SOURCES:
   Slune-soya.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/Slune-soya.patch
diff -u /dev/null SOURCES/Slune-soya.patch:1.1
--- /dev/null	Sun Sep 24 15:24:20 2006
+++ SOURCES/Slune-soya.patch	Sun Sep 24 15:24:15 2006
@@ -0,0 +1,99 @@
+--- Slune-1.0.12rc1.orig/slune	2006-09-24 13:25:25.000000000 +0200
++++ Slune-1.0.12rc1/slune	2006-09-24 15:11:04.000000000 +0200
+@@ -36,10 +36,8 @@
+   sys.path.insert(0, APPDIR)
+ 
+ import slune.globdef as globdef, soya
+-soya.init(width = globdef.SCREEN_WIDTH, height = globdef.SCREEN_HEIGHT, fullscreen = globdef.FULLSCREEN, sound = 1, sound_doppler_factor = 0.005, sound_reference_distance = 3.0)
+-#soya.init(width = globdef.SCREEN_WIDTH, height = globdef.SCREEN_HEIGHT, fullscreen = globdef.FULLSCREEN)
++soya.init(width = globdef.SCREEN_WIDTH, height = globdef.SCREEN_HEIGHT, fullscreen = globdef.FULLSCREEN)
+ soya.set_quality(globdef.QUALITY)
+-soya.set_sound_volume(globdef.SOUND_VOLUME)
+ 
+ LEVEL        = ""
+ PARRAIN_HOST = None
+--- Slune-1.0.12rc1.orig/level.py	2006-09-24 13:25:26.000000000 +0200
++++ Slune-1.0.12rc1/level.py	2006-09-24 15:11:04.000000000 +0200
+@@ -264,9 +264,7 @@
+     for child in self.children: child.advance_time(proportion)
+     soya.root_widget.widget_advance_time(proportion)
+     
+-  def render(self):
+-    for i in soya.BEFORE_RENDER: i()
+-    soya.render()
++  def render(self): soya.render()
+     
+   def end_round(self):
+     current = time.time()
+--- Slune-1.0.12rc1.orig/sound.py	2006-09-24 13:25:25.000000000 +0200
++++ Slune-1.0.12rc1/sound.py	2006-09-24 15:11:04.000000000 +0200
+@@ -26,9 +26,9 @@
+ def clean_mem    (*args): pass
+ 
+ if globdef.MUSIC or globdef.SOUND:
+-  def play_music   (filename):
+ 
+-    soya.SoundPlayer(soya.IDLER, soya.Sound.get(filename), play_in_3D = 0, loop = 1)
++  def play_music   (filename):
++	def play(filename, position = None, speed = None, looping = 0, gain = 0): pass
+ 
+ 
+   def end_music    ():
+@@ -38,7 +38,7 @@
+   def play         (filename, position = None, speed = None, looping = 0, gain = 1.0):
+     while position and (not isinstance(position, soya.World)): position = position.parent
+     if position:
+-      soya.SoundPlayer(position, soya.Sound.get(filename), loop = looping, gain = gain)
++	def play(filename, position = None, speed = None, looping = 0, gain = 0): pass
+     elif soya.IDLER:
+-      soya.SoundPlayer(soya.IDLER, soya.Sound.get(filename), play_in_3D = 0, loop = looping, gain = gain)
+-      
++	def play(filename, position = None, speed = None, looping = 0, gain = 0): pass
++
+--- Slune-1.0.12rc1.orig/gui_gl.py	2006-09-24 13:25:25.000000000 +0200
++++ Slune-1.0.12rc1/gui_gl.py	2006-09-24 15:12:52.000000000 +0200
+@@ -264,11 +264,10 @@
+     menu_h_option.choices[1].value = menu_h_option.choices[1].range[globdef.FULLSCREEN]
+     menu_h_option.choices[2].value = menu_h_option.choices[2].range[globdef.QUALITY]
+     menu_h_option.choices[3].value = globdef.MAX_VISION
+-    #menu_h_option.choices[4].value = menu_h_option.choices[4].range[globdef.SOUND]
+-    #menu_h_option.choices[5].value = menu_h_option.choices[5].range[globdef.MUSIC]
++    menu_h_option.choices[4].value = menu_h_option.choices[4].range[globdef.SOUND]
++    menu_h_option.choices[5].value = menu_h_option.choices[5].range[globdef.MUSIC]
+     #menu_h_option.choices[6].value = menu_h_option.choices[6].range[globdef.ASYNC_LOAD_MUSIC]
+     #menu_h_option.choices[7].value = globdef.SOUND_SYSTEM
+-    menu_h_option.choices[4].value = str(int(round(globdef.SOUND_VOLUME * 100)))
+     set_current_menu(menu_h_option)
+ 
+   def back_h_option():
+@@ -278,15 +277,13 @@
+     globdef.FULLSCREEN       = (menu_h_option.choices[1].value == _('on'))
+     globdef.QUALITY          = menu_h_option.choices[2].range.index(menu_h_option.choices[2].value)
+     globdef.MAX_VISION       = float(menu_h_option.choices[3].value)
+-    #globdef.SOUND            = (menu_h_option.choices[4].value == _('on'))
+-    #globdef.MUSIC            = (menu_h_option.choices[5].value == _('on'))
++    globdef.SOUND            = (menu_h_option.choices[4].value == _('on'))
++    globdef.MUSIC            = (menu_h_option.choices[5].value == _('on'))
+     #globdef.ASYNC_LOAD_MUSIC = (menu_h_option.choices[6].value == _('on'))
+     #globdef.SOUND_SYSTEM     = menu_h_option.choices[7].value
+-    globdef.SOUND_VOLUME     = int(menu_h_option.choices[4].value) / 100.0
+     soya.set_quality(globdef.QUALITY)
+     soya.set_video(globdef.SCREEN_WIDTH, globdef.SCREEN_HEIGHT, globdef.FULLSCREEN, 1)
+-    soya.set_sound_volume(globdef.SOUND_VOLUME)
+-    #import slune.sound; reload(slune.sound)
++    import slune.sound; reload(slune.sound)
+     go_back()
+ 
+   def show_p_option():
+@@ -369,9 +366,8 @@
+     soya.widget.Choice(_('Fullscreen'), None, None, checkbox),
+     soya.widget.Choice(_('Graphic quality'), None, None, [_('Low'), _('Medium'), _('High')]),
+     soya.widget.Choice(_('Max vision distance'), None, None, [0.5, 2.0], 0.1),
+-    soya.widget.Choice(_('Sound volume'), None, None, ['0', '10', '20', '30', '40', '50', '60', '70', '80', '90', '100']),
+-    #soya.widget.Choice(_('Sounds'), None, None, checkbox),
+-    #soya.widget.Choice(_('Music'), None, None, checkbox),
++    soya.widget.Choice(_('Sounds'), None, None, checkbox),
++    soya.widget.Choice(_('Music'), None, None, checkbox),
+     #soya.widget.Choice(_('Async load music'), None, None, checkbox),
+     #soya.widget.Choice(_('Sound system'), None, None, ["OpenAL", "OpenAL (old)", "SDL_mixer"]),
+     soya.widget.Choice(_('Back'), back_h_option)
================================================================


More information about the pld-cvs-commit mailing list