added some debug statements for JSfx.cpp

minor correction to handling download delegate removal
changed constant literals to use constant labels.  Not sure why this was changed in the first place as it didn't need to be.
This commit is contained in:
techdragon.nguyen@gmail.com
2012-02-05 23:32:55 +00:00
parent dc16ba2adb
commit d343b8e159
3 changed files with 8 additions and 4 deletions

View File

@@ -120,12 +120,14 @@ JMusic *JSoundSystem::LoadMusic(const char *fileName)
void JSoundSystem::ResumeMusic(JMusic *music)
{
NSLog(@"Resuming Music");
[[SoundManager sharedSoundManager] resumeMusic];
}
void JSoundSystem::PauseMusic(JMusic *music)
{
NSLog(@"Pausing Music");
[[SoundManager sharedSoundManager] pauseMusic];
}
@@ -133,12 +135,14 @@ void JSoundSystem::PauseMusic(JMusic *music)
void JSoundSystem::PlayMusic(JMusic *music, bool looping)
{
NSString *key = [NSString stringWithCString: music->key.c_str() encoding: NSUTF8StringEncoding];
NSLog(@"Playing music file %@", [NSString stringWithCString: music->filename.c_str() encoding:NSUTF8StringEncoding]);
[[SoundManager sharedSoundManager] playMusicWithKey: key timesToRepeat: looping? -1 : 1];
}
void JSoundSystem::StopMusic(JMusic *music)
{
NSLog(@"Stopping Music");
[[SoundManager sharedSoundManager] stopMusic];
}

View File

@@ -41,6 +41,7 @@
[wagicDownloadController performSelectorInBackground: @selector(startDownload:) withObject:@"core"];
[self.window addSubview: wagicDownloadController.view];
[wagicDownloadController.view release];
[self.window makeKeyWindow];
}
@@ -249,7 +250,7 @@
[glViewController release];
glViewController = [[EAGLViewController alloc] init];
[[[self.window subviews] lastObject] removeFromSuperview];
[self.window addSubview:self.glViewController.view];
NSNotificationCenter *dnc = [NSNotificationCenter defaultCenter];
@@ -259,7 +260,6 @@
[dnc addObserver: glViewController selector:@selector(resumeGame) name: UIApplicationDidBecomeActiveNotification object: nil];
[dnc addObserver: glViewController selector:@selector(resumeGame) name:UIApplicationWillEnterForegroundNotification object: nil];
[dnc addObserver: glViewController selector:@selector(destroyGame) name:UIApplicationWillTerminateNotification object: nil];
}
@@ -273,8 +273,8 @@
[hostReach release];
[wifiReach release];
[internetReach release];
[wagicDownloadController release];
[glViewController release];
[wagicDownloadController release];
[super dealloc];
}

View File

@@ -770,7 +770,7 @@ void GameStateShop::Render()
#ifndef TOUCH_ENABLED
float len = 4 + mFont->GetStringWidth(kOtherCardsString.c_str());
r->RenderQuad(pspIcons[6].get(), SCREEN_WIDTH - len - 0.5f - 10, SCREEN_HEIGHT - 8, 0, 0.5f, 0.5f);
r->RenderQuad(pspIcons[6].get(), SCREEN_WIDTH - len - kGamepadIconSize - 10, SCREEN_HEIGHT - 8, 0, kGamepadIconSize, kGamepadIconSize);
mFont->DrawString(kOtherCardsString, SCREEN_WIDTH - len, SCREEN_HEIGHT - 14);
#else
enableButtons();