diff --git a/direct/src/showbase/Loader.py b/direct/src/showbase/Loader.py index d28c10f5b8..4e66b77d1b 100644 --- a/direct/src/showbase/Loader.py +++ b/direct/src/showbase/Loader.py @@ -65,7 +65,7 @@ class Loader: Attempt to load a texture from the given file path using TexturePool class. Returns None if not found""" Loader.notify.info("Loading texture: %s" % (texturePath) ) - texture = self.__texturePool.loadTexture(Filename(texturePath)) + texture = self.__texturePool.loadTexture(texturePath) return texture # sound loading funcs diff --git a/direct/src/showbase/ShowBase.py b/direct/src/showbase/ShowBase.py index 95c7f1c8f9..212b13ec1b 100644 --- a/direct/src/showbase/ShowBase.py +++ b/direct/src/showbase/ShowBase.py @@ -4,10 +4,10 @@ from DirectNotifyGlobal import * from MessengerGlobal import * from TaskManagerGlobal import * from EventManagerGlobal import * -from AudioManagerGlobal import * from PythonUtil import * import Task import EventManager +import sys class ShowBase: @@ -16,12 +16,11 @@ class ShowBase: def __init__(self): # Get the dconfig object - self.config = getConfigShowbase() + self.config = ConfigConfigureGetConfigConfigShowbase # Store dconfig variables self.wantTk = self.config.GetBool('want-tk', 0) self.wantSound = self.config.GetBool('want-sound', 1) - self.wantMusic = self.config.GetBool('want-music', 1) import Loader @@ -71,14 +70,19 @@ class ShowBase: self.taskMgr = taskMgr - self.audioMgr = audioMgr - - self.wantTk = 0 + self.createAudioManager() self.createRootPanel() self.restart() - + def createAudioManager(self): + if self.wantSound: + from AudioManagerGlobal import * + self.audioMgr = audioMgr + self.audioMgr.spawnUpdate() + else: + self.audioMgr = None + def createRootPanel(self): if self.wantTk: from TkGlobal import * @@ -88,8 +92,6 @@ class ShowBase: def igloop(self, state): self.win.update() - if (self.wantSound): - self.audioMgr.update() return Task.cont def restart(self): diff --git a/direct/src/showbase/showBase.h b/direct/src/showbase/showBase.h index eed483a52a..cd2908d2dc 100644 --- a/direct/src/showbase/showBase.h +++ b/direct/src/showbase/showBase.h @@ -17,6 +17,12 @@ #include #include +#define testint 1 +#define testfloat 1.2345 +#define testcstring "testcstring" +#include +#define teststring string("teststring") + ConfigureDecl(config_showbase, EXPCL_DIRECT, EXPTP_DIRECT); typedef Config::Config ConfigShowbase;