- fix for issue 772

- fixed some issues in zstream that prevented to use "getline" in zipped streams 
- added a "pooled buffers" system to keep a cache of file descriptors. This is potentially dangerous though, but shaves several seconds of loading time on the PSP. If problems arise on other platforms I'll make it a compilation parameter
- gracefully fail when calling manacost information on a not properly initialized mana cost
This commit is contained in:
wagic.the.homebrew
2011-12-28 16:14:08 +00:00
parent 9e80314f6d
commit 591f0e0d30
12 changed files with 276 additions and 61 deletions
+8 -5
View File
@@ -126,6 +126,7 @@ void GameApp::Create()
LOG("init Res Folder at " + foldersRoot);
JFileSystem::init(foldersRoot + "User/", foldersRoot + systemFolder);
// Create User Folders (for write access) if they don't exist
{
const char* folders[] = { "ai", "ai/baka", "ai/baka/stats", "campaigns", "graphics", "lang", "packs", "player", "player/stats", "profiles", "rules", "sets", "settings", "sound", "sound/sfx", "themes", "test"};
@@ -160,6 +161,13 @@ void GameApp::Create()
//Test for Music files presence
JFileSystem * jfs = JFileSystem::GetInstance();
HasMusic = jfs->FileExists(WResourceManager::Instance()->musicFile("Track0.mp3")) && jfs->FileExists(WResourceManager::Instance()->musicFile("Track1.mp3"));
LOG("Init Collection");
MTGAllCards::loadInstance();
LOG("Loading rules");
Rules::loadAllRules();
LOG("Loading Textures");
LOG("--Loading menuicons.png");
@@ -235,8 +243,6 @@ void GameApp::Create()
jq = WResourceManager::Instance()->RetrieveQuad("phasebar.png", 0, 0, 0, 0, "phasebar", RETRIEVE_MANAGE);
LOG("Init Collection");
MTGAllCards::loadInstance();
LOG("Creating Game States");
mGameStates[GAME_STATE_DECK_VIEWER] = NEW GameStateDeckViewer(this);
@@ -265,9 +271,6 @@ void GameApp::Create()
mCurrentState = NULL;
mNextState = mGameStates[GAME_STATE_MENU];
LOG("--Load Game rules");
Rules::loadAllRules();
//Set Audio volume
JSoundSystem::GetInstance()->SetSfxVolume(options[Options::SFXVOLUME].number);
JSoundSystem::GetInstance()->SetMusicVolume(options[Options::MUSICVOLUME].number);