From 83a1f386265ee28e8cbc0266ec3a6b1bebeab213 Mon Sep 17 00:00:00 2001 From: "Carl.Kenner" Date: Sat, 30 May 2009 18:11:59 +0000 Subject: [PATCH] Palettes are working well now. --- source/ngc/menu.cpp | 5 +++-- source/ngc/preferences.cpp | 18 ------------------ vba-wii.pnproj | 2 +- 3 files changed, 4 insertions(+), 21 deletions(-) diff --git a/source/ngc/menu.cpp b/source/ngc/menu.cpp index 63826d5..5caa75e 100644 --- a/source/ngc/menu.cpp +++ b/source/ngc/menu.cpp @@ -4236,13 +4236,13 @@ static int MenuPalette() } else if(importBtn.GetState() == STATE_CLICKED) { - SavePalette(NOTSILENT, RomTitle); + SavePalette(SILENT, RomTitle); menu = MENU_GAMESETTINGS_PALETTE; } else if(closeBtn.GetState() == STATE_CLICKED) { menu = MENU_EXIT; - SavePalette(NOTSILENT, RomTitle); + SavePalette(SILENT, RomTitle); SavePrefs(NOTSILENT); exitSound->Play(); @@ -4259,6 +4259,7 @@ static int MenuPalette() } else if(backBtn.GetState() == STATE_CLICKED) { + SavePalette(SILENT, RomTitle); menu = MENU_GAMESETTINGS_VIDEO; } } diff --git a/source/ngc/preferences.cpp b/source/ngc/preferences.cpp index b5d9388..392deeb 100644 --- a/source/ngc/preferences.cpp +++ b/source/ngc/preferences.cpp @@ -910,9 +910,6 @@ bool LoadPalette(const char *gameName) prefFound = LoadPalFromMethod(METHOD_SMB, gameName); if(!prefFound) { - char msg[1024]; - sprintf(msg, "Failed to load palette"); - InfoPrompt(msg); return CreateAndLoadPalette(SILENT, gameName, true); } return true; @@ -934,9 +931,6 @@ bool LoadPalettes() prefFound = LoadPalsFromMethod(METHOD_SMB); if(!prefFound) { - char msg[1024]; - sprintf(msg, "Failed to load palettes"); - InfoPrompt(msg); CreateAndLoadPalette(SILENT, "", false); if(ChangeInterface(METHOD_SD, SILENT)) prefFound = LoadPalsFromMethod(METHOD_SD); @@ -960,36 +954,24 @@ static void AddPalette(gamePalette pal, const char *gameName) { return; } } - char msg[1024]; - sprintf(msg, "Adding new palette '%s'", gameName); - InfoPrompt(msg); palettes[loadedPalettes] = pal; strncpy(palettes[loadedPalettes].gameName, gameName, 17); loadedPalettes++; } bool SavePalette(bool silent, const char *gameName) { - char msg[1024]; - sprintf(msg, "Save palette '%s'", gameName); - InfoPrompt(msg); bool prefFound = LoadPalettes(); if (!prefFound) { delete[] palettes; palettes = NULL; return false; } - sprintf(msg, "%d palettes loaded", loadedPalettes); - InfoPrompt(msg); if(prefFound && palettes) { for (int i=0; i \ No newline at end of file + \ No newline at end of file