- Fixed a bug in SampleCache
- simplified card files initial parsing
This commit is contained in:
wagic.the.homebrew
2008-11-29 15:31:56 +00:00
parent 58a50705de
commit 7bf9cc8c07
8 changed files with 40 additions and 108 deletions
+1
View File
@@ -141,6 +141,7 @@ class GameStateMenu: public GameState, public JGuiListener
SAFE_DELETE(subMenuController);
SAFE_DELETE(mIconsTexture);
for (int i = 0; i < 10 ; i++){
+4 -5
View File
@@ -13,8 +13,10 @@
#include "../include/GameApp.h"
#include "../include/TexturesCache.h"
#include <string>
using std::string;
class GameApp;
class MTGCard;
@@ -40,9 +42,6 @@ class MtgSets{
class MTGAllCards {
protected:
int conf_read_mode;
int conf_fd;
char * conf_buffer;
int read_cursor;
int colorsCount[MTG_NB_COLORS];
int total_cards;
GameApp * parent;
@@ -64,11 +63,11 @@ class MTGAllCards {
int countByType(const char * _type);
int countByColor(int color);
int countBySet(int setId);
int readConfLine(int set_id);
int readConfLine(ifstream &file, int set_id);
int totalCards();
int randomCardId();
private:
int processConfLine(char* file, MTGCard* card);
int processConfLine(string s, MTGCard* card);
};
-10
View File
@@ -26,23 +26,13 @@
#include <algorithm>
#include <stdlib.h>
#define BUFSIZE 600
using std::string;
template <typename T, size_t N>
char ( &_ArraySizeHelper( T (&array)[N] ))[N];
#define countof( array ) (sizeof( _ArraySizeHelper( array ) ))
int lowercase(string source);
int filesize(const char * filename);
int read_file (const char * filename, char * buffer, int filesize);
int readline (char * in_buffer, char * out_buffer, int cursor);
int readfile_to_ints(const char * filename, int * out_buffer);
int fileExists(const char * filename);
#endif