Erwan
- Zip file support for card pictures - TODO : linux, update JGFX.cpp for zip support - TODO : make sure there is no leak in the PSP version
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
#include "../include/GameApp.h"
|
||||
#include "../include/MTGCard.h"
|
||||
|
||||
static const char* GAME_VERSION = "WTH?! 0.6.1 - by WilLoW";
|
||||
static const char* GAME_VERSION = "WTH?! 0.6.2 - by WilLoW";
|
||||
#define ALPHA_WARNING 0
|
||||
|
||||
#define DEFAULT_ANGLE_MULTIPLIER 0.4
|
||||
|
||||
@@ -73,9 +73,9 @@ void GameStateOptions::Render()
|
||||
JRenderer::GetInstance()->ClearScreen(ARGB(0,0,0,0));
|
||||
|
||||
const char * const CreditsText[] = {
|
||||
"Wagic, The Homebrew ?! by WilLoW",
|
||||
"Wagic, The Homebrew?! by WilLoW",
|
||||
"",
|
||||
"updates, new cards, and more on http://www.wololo.net/wagic",
|
||||
"updates, new cards, and more on http://wololo.net/wagic",
|
||||
"Many thanks to the devs and card creators who help this project",
|
||||
"",
|
||||
"Developped with the JGE++ Library (http://jge.khors.com)",
|
||||
@@ -83,8 +83,8 @@ void GameStateOptions::Render()
|
||||
"Background picture from KDE4 , www.kde.org",
|
||||
"SFX From www.soundsnap.com",
|
||||
"",
|
||||
"Music by Celestial Aeon Project, under Creative Commons License",
|
||||
"Their music can be downloaded at http://www.jamendo.com",
|
||||
"Music by Celestial Aeon Project, http://www.jamendo.com",
|
||||
"",
|
||||
"",
|
||||
"This work is not related to or endorsed by Wizards of the Coast, Inc",
|
||||
"",
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "../include/config.h"
|
||||
#include "../include/TexturesCache.h"
|
||||
#include "../include/GameOptions.h"
|
||||
#include <JFileSystem.h>
|
||||
|
||||
TexturesCache::TexturesCache(){
|
||||
nb_textures = 0;
|
||||
@@ -95,6 +96,7 @@ int CardTexture::getId(){
|
||||
|
||||
CardTexture::CardTexture(MTGCard * card, int _type): type(_type){
|
||||
LOG("==Creating CardTexture Object");
|
||||
JFileSystem* fs = JFileSystem::GetInstance();
|
||||
char filename[100];
|
||||
quad = NULL;
|
||||
tex = NULL;
|
||||
@@ -105,11 +107,23 @@ CardTexture::CardTexture(MTGCard * card, int _type): type(_type){
|
||||
}else{
|
||||
sprintf(filename, "sets/%s/%s", card->getSetName(), card->getImageName());
|
||||
}
|
||||
#ifdef WIN32
|
||||
OutputDebugString(filename);
|
||||
#endif
|
||||
if (fileExists(filename))
|
||||
|
||||
if (fileExists(filename)){
|
||||
fs->DetachZipFile();
|
||||
tex = JRenderer::GetInstance()->LoadTexture(filename, false,GU_PSM_5551);
|
||||
}else{
|
||||
char zipname[100];
|
||||
sprintf(zipname, "Res/sets/%s/%s.zip", card->getSetName(),card->getSetName());
|
||||
if (fileExists(zipname)){
|
||||
fs->AttachZipFile(zipname);
|
||||
if (type == CACHE_THUMB){
|
||||
sprintf(filename, "thumbnails/%s", card->getImageName());
|
||||
}else{
|
||||
sprintf(filename, "%s", card->getImageName());
|
||||
}
|
||||
tex = JRenderer::GetInstance()->LoadTexture(filename, false,GU_PSM_5551);
|
||||
}
|
||||
}
|
||||
if (tex){
|
||||
quad = NEW JQuad(tex, 0.0f, 0.0f, tex->mWidth, tex->mHeight);
|
||||
nbpixels = tex->mTexHeight * tex->mTexWidth;
|
||||
|
||||
Reference in New Issue
Block a user