From d343b8e159888ea7a70d1cda1db092117d0855f5 Mon Sep 17 00:00:00 2001 From: "techdragon.nguyen@gmail.com" Date: Sun, 5 Feb 2012 23:32:55 +0000 Subject: [PATCH] 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. --- JGE/src/iOS/JSfx.cpp | 4 ++++ JGE/src/iOS/wagicAppDelegate.m | 6 +++--- projects/mtg/src/GameStateShop.cpp | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/JGE/src/iOS/JSfx.cpp b/JGE/src/iOS/JSfx.cpp index b7c060920..efb88f901 100644 --- a/JGE/src/iOS/JSfx.cpp +++ b/JGE/src/iOS/JSfx.cpp @@ -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]; } diff --git a/JGE/src/iOS/wagicAppDelegate.m b/JGE/src/iOS/wagicAppDelegate.m index 2cb206b62..e84f606c3 100755 --- a/JGE/src/iOS/wagicAppDelegate.m +++ b/JGE/src/iOS/wagicAppDelegate.m @@ -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]; } diff --git a/projects/mtg/src/GameStateShop.cpp b/projects/mtg/src/GameStateShop.cpp index 87b3f3d5f..b925aa667 100644 --- a/projects/mtg/src/GameStateShop.cpp +++ b/projects/mtg/src/GameStateShop.cpp @@ -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();