Jeck - Support for user profiles, preliminary theme support, virtual keypad, options GUI update. Still a bit unorganized, but it works.
This commit is contained in:
@@ -22,7 +22,7 @@ public:
|
||||
|
||||
class Credits{
|
||||
private:
|
||||
int isDifficultyUnlocked();
|
||||
int isDifficultyUnlocked();
|
||||
int isMomirUnlocked();
|
||||
int isEvilTwinUnlocked();
|
||||
int isRandomDeckUnlocked();
|
||||
@@ -32,8 +32,8 @@ public:
|
||||
Player * p1, *p2;
|
||||
GameApp * app;
|
||||
int showMsg;
|
||||
int unlocked;
|
||||
JQuad * unlockedQuad;
|
||||
int unlocked;
|
||||
JQuad * unlockedQuad;
|
||||
JTexture * unlockedTex;
|
||||
string unlockedString;
|
||||
vector<CreditBonus *> bonus;
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
|
||||
|
||||
#include "../include/GameState.h"
|
||||
#include "../include/GameOptions.h"
|
||||
|
||||
#include "../include/MTGDeck.h"
|
||||
#include "../include/MTGCard.h"
|
||||
|
||||
@@ -5,8 +5,14 @@
|
||||
#include <string>
|
||||
using std::map;
|
||||
using std::string;
|
||||
#include <JGE.h>
|
||||
#include "../include/SimplePad.h"
|
||||
#include "../include/GameApp.h"
|
||||
|
||||
#define OPTIONS_SAVEFILE RESPATH"/settings/options.txt"
|
||||
#define GLOBAL_SETTINGS RESPATH"/settings/options.txt"
|
||||
#define PLAYER_SAVEFILE "data.dat"
|
||||
#define PLAYER_SETTINGS "options.txt"
|
||||
#define PLAYER_COLLECTION "collection.dat"
|
||||
|
||||
struct Options {
|
||||
static const string MUSICVOLUME;
|
||||
@@ -22,12 +28,52 @@ struct Options {
|
||||
static const string INTERRUPTMYSPELLS;
|
||||
static const string INTERRUPTMYABILITIES;
|
||||
static const string OSD;
|
||||
static const string ACTIVE_PROFILE;
|
||||
static const string ACTIVE_THEME;
|
||||
};
|
||||
|
||||
struct Metrics {
|
||||
//*_TC is text-color, *_TCH is highlighted text color
|
||||
//*_FC is fill-color, *_FCH is highlighted fill color
|
||||
//*_B and *_BH are for secondary text/fill colors, if needed
|
||||
//*_X, *_Y, *_W, *_H are x, y, width and height.
|
||||
static const string LOADING_TC;
|
||||
static const string STATS_TC;
|
||||
static const string SCROLLER_TC;
|
||||
static const string SCROLLER_FC;
|
||||
static const string MAINMENU_TC;
|
||||
static const string POPUP_MENU_FC;
|
||||
static const string POPUP_MENU_TC;
|
||||
static const string POPUP_MENU_TCH;
|
||||
static const string MSG_FAIL_TC;
|
||||
static const string OPTION_ITEM_FC;
|
||||
static const string OPTION_ITEM_TC;
|
||||
static const string OPTION_ITEM_TCH;
|
||||
static const string OPTION_HEADER_FC;
|
||||
static const string OPTION_HEADER_TC;
|
||||
static const string OPTION_SCROLLBAR_FC;
|
||||
static const string OPTION_SCROLLBAR_FCH;
|
||||
static const string OPTION_TAB_FC;
|
||||
static const string OPTION_TAB_FCH;
|
||||
static const string OPTION_TAB_TC;
|
||||
static const string OPTION_TAB_TCH;
|
||||
static const string OPTION_TEXT_TC;
|
||||
static const string OPTION_TEXT_FC;
|
||||
static const string KEY_TC;
|
||||
static const string KEY_TCH;
|
||||
static const string KEY_FC;
|
||||
static const string KEY_FCH;
|
||||
static const string KEYPAD_FC;
|
||||
static const string KEYPAD_FCH;
|
||||
static const string KEYPAD_TC;
|
||||
};
|
||||
|
||||
class GameOption {
|
||||
public:
|
||||
int number;
|
||||
string str;
|
||||
//All calls to asColor should include a fallback color for people without a theme.
|
||||
PIXEL_TYPE asColor(PIXEL_TYPE fallback = ARGB(255,255,255,255));
|
||||
GameOption(int value = 0);
|
||||
GameOption(string value);
|
||||
};
|
||||
@@ -35,18 +81,55 @@ public:
|
||||
|
||||
class GameOptions {
|
||||
public:
|
||||
string mFilename;
|
||||
int save();
|
||||
int load();
|
||||
|
||||
static const char * phaseInterrupts[];
|
||||
GameOption& operator[](string);
|
||||
GameOptions();
|
||||
GameOptions(string filename);
|
||||
~GameOptions();
|
||||
|
||||
private:
|
||||
static map <string,int> optionsTypes;
|
||||
map<string,GameOption> values;
|
||||
};
|
||||
|
||||
extern GameOptions options;
|
||||
class GameSettings{
|
||||
public:
|
||||
friend class GameApp;
|
||||
GameSettings();
|
||||
~GameSettings();
|
||||
int save();
|
||||
|
||||
SimplePad * keypadStart(string input, string * _dest = NULL, int _x = SCREEN_WIDTH/2, int _y = SCREEN_HEIGHT/2);
|
||||
string keypadFinish();
|
||||
void keypadShutdown();
|
||||
void keypadTitle(string set);
|
||||
bool keypadActive() {if(keypad) return keypad->isActive(); return false;};
|
||||
void keypadUpdate(float dt) {if(keypad) keypad->Update(dt);};
|
||||
void keypadRender() {if(keypad) keypad->Render();};
|
||||
|
||||
|
||||
//These return a filepath accurate to the current mode/profile/theme, and can
|
||||
//optionally fallback to a file within a certain directory.
|
||||
//The sanity=false option returns the adjusted path even if the file doesn't exist.
|
||||
string profileFile(string filename="", string fallback="", bool sanity=true,bool relative=false);
|
||||
string modeFile(string filename, string fallback, bool relative);
|
||||
string themeGraphic(string filename);
|
||||
|
||||
void checkProfile();
|
||||
void createUsersFirstDeck(int setId);
|
||||
|
||||
GameOption& operator[](string);
|
||||
GameOptions* profileOptions;
|
||||
GameOptions* globalOptions;
|
||||
GameOptions* themeOptions;
|
||||
|
||||
private:
|
||||
GameApp * theGame;
|
||||
SimplePad * keypad;
|
||||
};
|
||||
|
||||
extern GameSettings options;
|
||||
|
||||
#endif
|
||||
|
||||
@@ -144,7 +144,7 @@ class GameStateDeckViewer: public GameState, public JGuiListener
|
||||
pricelist = NEW PriceList(RESPATH"/settings/prices.dat",mParent->collection);
|
||||
playerdata = NEW PlayerData(mParent->collection);
|
||||
sellMenu = NULL;
|
||||
myCollection = NEW DeckDataWrapper(NEW MTGDeck(RESPATH"/player/collection.dat", &cache,mParent->collection));
|
||||
myCollection = NEW DeckDataWrapper(NEW MTGDeck(options.profileFile(PLAYER_COLLECTION,"",false).c_str(), &cache,mParent->collection));
|
||||
displayed_deck = myCollection;
|
||||
myDeck = NULL;
|
||||
menuFont = GameApp::CommonRes->GetJLBFont(Constants::MENU_FONT);
|
||||
@@ -172,7 +172,7 @@ class GameStateDeckViewer: public GameState, public JGuiListener
|
||||
}
|
||||
|
||||
|
||||
pspIconsTexture = JRenderer::GetInstance()->LoadTexture("graphics/iconspsp.png", TEX_TYPE_USE_VRAM);
|
||||
pspIconsTexture = JRenderer::GetInstance()->LoadTexture(options.themeGraphic("iconspsp.png").c_str(), TEX_TYPE_USE_VRAM);
|
||||
|
||||
for (int i=0; i < 8; i++){
|
||||
pspIcons[i] = NEW JQuad(pspIconsTexture, i*32, 0, 32, 32);
|
||||
@@ -184,7 +184,7 @@ class GameStateDeckViewer: public GameState, public JGuiListener
|
||||
//menuFont = NEW JLBFont("graphics/f3",16);
|
||||
menuFont = GameApp::CommonRes->GetJLBFont("graphics/f3");
|
||||
welcome_menu = NEW SimpleMenu(10,this,menuFont,20,20);
|
||||
int nbDecks = fillDeckMenu(welcome_menu,RESPATH"/player");
|
||||
int nbDecks = fillDeckMenu(welcome_menu,options.profileFile());
|
||||
welcome_menu->Add(nbDecks+1, "--NEW--");
|
||||
welcome_menu->Add(-1, "Cancel");
|
||||
|
||||
@@ -726,12 +726,13 @@ class GameStateDeckViewer: public GameState, public JGuiListener
|
||||
|
||||
int loadDeck(int deckid){
|
||||
SAFE_DELETE(myCollection);
|
||||
myCollection = NEW DeckDataWrapper(NEW MTGDeck(RESPATH"/player/collection.dat", &cache,mParent->collection));
|
||||
string profile = options[Options::ACTIVE_PROFILE].str;
|
||||
myCollection = NEW DeckDataWrapper(NEW MTGDeck(options.profileFile(PLAYER_COLLECTION,"",false).c_str(), &cache,mParent->collection));
|
||||
displayed_deck = myCollection;
|
||||
char filename[4096];
|
||||
sprintf(filename, RESPATH"/player/deck%i.txt", deckid);
|
||||
char deckname[256];
|
||||
sprintf(deckname,"deck%i.txt",deckid);
|
||||
SAFE_DELETE(myDeck);
|
||||
myDeck = NEW DeckDataWrapper(NEW MTGDeck(filename, &cache,mParent->collection));
|
||||
myDeck = NEW DeckDataWrapper(NEW MTGDeck(options.profileFile(deckname).c_str(), &cache,mParent->collection));
|
||||
MTGCard * current = myDeck->getNext();
|
||||
while (current){
|
||||
int howmanyinDeck = myDeck->cards[current];
|
||||
|
||||
@@ -30,9 +30,8 @@ class GameStateDuel: public GameState, public JGuiListener
|
||||
SimpleMenu * deckmenu;
|
||||
SimpleMenu * opponentMenu;
|
||||
SimpleMenu * menu;
|
||||
bool premadeDeck;
|
||||
JLBFont* mFont, *opponentMenuFont;
|
||||
string playerDecksDir;
|
||||
|
||||
|
||||
void loadPlayer(int playerId, int decknb = 0, int isAI = 0);
|
||||
void loadPlayerMomir(int playerId, int isAI);
|
||||
|
||||
@@ -32,7 +32,7 @@ class GameStateMenu: public GameState, public JGuiListener
|
||||
|
||||
DIR *mDip;
|
||||
struct dirent *mDit;
|
||||
char mCurrentSetName[10];
|
||||
char mCurrentSetName[32];
|
||||
char mCurrentSetFileName[512];
|
||||
|
||||
int mReadConf;
|
||||
@@ -52,7 +52,8 @@ class GameStateMenu: public GameState, public JGuiListener
|
||||
virtual void Render();
|
||||
virtual void ButtonPressed(int controllerId, int controlId);
|
||||
|
||||
int nextCardSet(); // Retrieves the next set subfolder automatically
|
||||
int nextDirectory(char * root, char * file); // Retrieves the next directory to have matching file
|
||||
void resetDirectory();
|
||||
void createUsersFirstDeck(int setId);
|
||||
virtual ostream& toString(ostream& out) const;
|
||||
};
|
||||
|
||||
@@ -6,10 +6,12 @@
|
||||
|
||||
#define SHOW_OPTIONS 1
|
||||
#define SHOW_OPTIONS_MENU 2
|
||||
#define SHOW_OPTIONS_PROFILE 3
|
||||
|
||||
class GameApp;
|
||||
class OptionsList;
|
||||
class OptionsMenu;
|
||||
class SimpleMenu;
|
||||
class SimplePad;
|
||||
|
||||
class GameStateOptions: public GameState, public JGuiListener
|
||||
{
|
||||
@@ -18,8 +20,10 @@ private:
|
||||
|
||||
public:
|
||||
SimpleMenu * optionsMenu;
|
||||
SimpleMenu * confirmMenu;
|
||||
OptionsMenu * optionsTabs;
|
||||
|
||||
int mState;
|
||||
OptionsList * optionsList;
|
||||
GameStateOptions(GameApp* parent);
|
||||
virtual ~GameStateOptions();
|
||||
|
||||
|
||||
@@ -1,40 +1,189 @@
|
||||
#ifndef _OPTION_ITEM_H_
|
||||
#define _OPTION_ITEM_H_
|
||||
|
||||
#include <JGui.h>
|
||||
#include <string>
|
||||
|
||||
using std::string;
|
||||
|
||||
class OptionItem:public JGuiObject{
|
||||
public:
|
||||
string displayValue, id;
|
||||
int value;
|
||||
int hasFocus;
|
||||
int maxValue, increment;
|
||||
float x, y;
|
||||
OptionItem(string _id, string _displayValue, int _maxValue = 1, int _increment = 1);
|
||||
|
||||
virtual void Render();
|
||||
virtual void Update(float dt);
|
||||
virtual void Entering();
|
||||
virtual bool Leaving();
|
||||
void setData();
|
||||
virtual void updateValue(){value+=increment; if (value>maxValue) value=0;};
|
||||
virtual ostream& toString(ostream& out) const;
|
||||
};
|
||||
|
||||
class OptionsList{
|
||||
public:
|
||||
OptionItem * options[20];
|
||||
int nbitems;
|
||||
int current;
|
||||
OptionsList();
|
||||
~OptionsList();
|
||||
void Render();
|
||||
void Update(float dt);
|
||||
void Add(OptionItem * item);
|
||||
void save();
|
||||
};
|
||||
|
||||
#endif
|
||||
#ifndef _OPTION_ITEM_H_
|
||||
#define _OPTION_ITEM_H_
|
||||
|
||||
#include <JGui.h>
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include "../include/GameApp.h"
|
||||
|
||||
using std::string;
|
||||
|
||||
#define MAX_OPTION_TABS 5
|
||||
#define MAX_OPTION_ITEMS 20
|
||||
#define MAX_ONSCREEN_OPTIONS 8
|
||||
#define OPTION_CENTER 4
|
||||
|
||||
#define OPTIONS_SUBMODE_NORMAL 0
|
||||
#define OPTIONS_SUBMODE_RELOAD 1
|
||||
#define OPTIONS_SUBMODE_PROFILE 2
|
||||
#define OPTIONS_SUBMODE_MODE 3
|
||||
#define OPTIONS_SUBMODE_THEME 4
|
||||
|
||||
class OptionItem {
|
||||
public:
|
||||
string displayValue, id;
|
||||
int hasFocus;
|
||||
bool canSelect;
|
||||
float x, y;
|
||||
float width, height;
|
||||
virtual ostream& toString(ostream& out)const;
|
||||
|
||||
OptionItem( string _id, string _displayValue);
|
||||
|
||||
virtual void Entering();
|
||||
virtual bool Leaving();
|
||||
virtual void Update(float dt);
|
||||
virtual void updateValue()=0;
|
||||
virtual void Reload(){};
|
||||
virtual void Render()=0;
|
||||
virtual void setData()=0;
|
||||
virtual int Submode() {return OPTIONS_SUBMODE_NORMAL;};
|
||||
virtual void cancelSubmode() {};
|
||||
virtual void acceptSubmode() {};
|
||||
};
|
||||
|
||||
class OptionInteger:public OptionItem{
|
||||
public:
|
||||
int value;
|
||||
int maxValue, increment;
|
||||
|
||||
OptionInteger(string _id, string _displayValue, int _maxValue = 1, int _increment = 1);
|
||||
|
||||
virtual void Reload() {if(id != "") value = options[id].number;};
|
||||
virtual void Render();
|
||||
virtual void setData();
|
||||
virtual void updateValue(){value+=increment; if (value>maxValue) value=0;};
|
||||
virtual ostream& toString(ostream& out) const;
|
||||
};
|
||||
|
||||
class OptionString:public OptionItem{
|
||||
public:
|
||||
string value;
|
||||
OptionString(string _id, string _displayValue);
|
||||
|
||||
virtual void Render();
|
||||
virtual void setData();
|
||||
virtual void updateValue();
|
||||
virtual void Reload() {if(id != "") value = options[id].str;};
|
||||
virtual ostream& toString(ostream& out) const;
|
||||
bool bShowValue;
|
||||
};
|
||||
class OptionNewProfile:public OptionString{
|
||||
public:
|
||||
OptionNewProfile(string _id, string _displayValue) : OptionString(_id, _displayValue) {bShowValue=false;};
|
||||
virtual void updateValue();
|
||||
virtual void Update(float dt);
|
||||
virtual int Submode();
|
||||
bool bChanged;
|
||||
};
|
||||
|
||||
class OptionHeader:public OptionItem{
|
||||
public:
|
||||
OptionHeader(string _displayValue): OptionItem("", _displayValue) { canSelect=false;};
|
||||
virtual void Render();
|
||||
virtual void setData() {};
|
||||
virtual void updateValue() {};
|
||||
};
|
||||
|
||||
class OptionText:public OptionItem{
|
||||
public:
|
||||
OptionText(string _displayValue): OptionItem("", _displayValue) { canSelect=false;};
|
||||
virtual void Render();
|
||||
virtual void setData() {};
|
||||
virtual void updateValue() {};
|
||||
};
|
||||
|
||||
class OptionSelect:public OptionItem{
|
||||
public:
|
||||
int value;
|
||||
vector<string> selections;
|
||||
|
||||
virtual void addSelection(string s);
|
||||
OptionSelect(string _id, string _displayValue): OptionItem(_id, _displayValue) {value = 0;};
|
||||
virtual void Reload() {initSelections();};
|
||||
virtual void Render();
|
||||
virtual void setData();
|
||||
virtual void initSelections();
|
||||
virtual void updateValue(){value++; if (value > selections.size() - 1 || value < 0) value=0;};
|
||||
virtual ostream& toString(ostream& out) const;
|
||||
};
|
||||
|
||||
|
||||
class OptionDirectory:public OptionSelect{
|
||||
public:
|
||||
virtual void Reload();
|
||||
OptionDirectory(string _root, string _id, string _displayValue);
|
||||
private:
|
||||
string root;
|
||||
};
|
||||
|
||||
class OptionProfile:public OptionDirectory{
|
||||
public:
|
||||
OptionProfile(GameApp * _app);
|
||||
~OptionProfile();
|
||||
virtual void addSelection(string s);
|
||||
virtual bool Leaving();
|
||||
virtual void Entering();
|
||||
virtual void Render();
|
||||
virtual void Update(float dt);
|
||||
virtual void updateValue();
|
||||
virtual int Submode();
|
||||
virtual void cancelSubmode();
|
||||
virtual void acceptSubmode();
|
||||
void populate();
|
||||
private:
|
||||
bool bCheck;
|
||||
JQuad * mAvatar;
|
||||
JTexture * mAvatarTex;
|
||||
GameApp * app;
|
||||
string preview;
|
||||
int initialValue;
|
||||
};
|
||||
|
||||
class OptionsList{
|
||||
public:
|
||||
string sectionName;
|
||||
string failMsg;
|
||||
int nbitems;
|
||||
int current;
|
||||
OptionsList(string name);
|
||||
~OptionsList();
|
||||
bool Leaving();
|
||||
void Entering();
|
||||
void Render();
|
||||
void reloadValues();
|
||||
void Update(float dt);
|
||||
void Add(OptionItem * item);
|
||||
void save();
|
||||
int Submode();
|
||||
void acceptSubmode();
|
||||
void cancelSubmode();
|
||||
|
||||
OptionItem * operator[](int);
|
||||
private:
|
||||
OptionItem * listItems[MAX_OPTION_ITEMS];
|
||||
};
|
||||
|
||||
class OptionsMenu
|
||||
{
|
||||
public:
|
||||
OptionsList * tabs[MAX_OPTION_TABS];
|
||||
int nbitems;
|
||||
int current;
|
||||
|
||||
OptionsMenu();
|
||||
~OptionsMenu();
|
||||
|
||||
bool isTab(string name);
|
||||
int Submode();
|
||||
void acceptSubmode();
|
||||
void cancelSubmode();
|
||||
void Render();
|
||||
void reloadValues();
|
||||
void Update(float dt);
|
||||
void Add(OptionsList * tab);
|
||||
void save();
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
#ifndef _PLAYER_DATA_H_
|
||||
#define _PLAYER_DATA_H_
|
||||
|
||||
#define PLAYER_SAVEFILE RESPATH"/player/data.dat"
|
||||
|
||||
#include "../include/MTGDeck.h"
|
||||
|
||||
class PlayerData{
|
||||
|
||||
@@ -16,11 +16,6 @@ class SimpleMenu:public JGuiController{
|
||||
static const unsigned VMARGIN;
|
||||
static const unsigned HMARGIN;
|
||||
static const signed LINE_HEIGHT;
|
||||
static const char* spadeLPath;
|
||||
static const char* spadeRPath;
|
||||
static const char* jewelPath;
|
||||
static const char* sidePath;
|
||||
static const char* titleFontPath;
|
||||
|
||||
private:
|
||||
int mHeight, mWidth, mX, mY;
|
||||
|
||||
69
projects/mtg/include/SimplePad.h
Normal file
69
projects/mtg/include/SimplePad.h
Normal file
@@ -0,0 +1,69 @@
|
||||
#ifndef _SIMPLEPAD_H_
|
||||
#define _SIMPLEPAD_H_
|
||||
|
||||
#include <string>
|
||||
#include <JGui.h>
|
||||
#include <JLBFont.h>
|
||||
#include "hge/hgeparticle.h"
|
||||
|
||||
enum SIMPLE_KEYS{
|
||||
KPD_A, KPD_B, KPD_C, KPD_D, KPD_E, KPD_F,
|
||||
KPD_G, KPD_H, KPD_I, KPD_J, KPD_K, KPD_L,
|
||||
KPD_M, KPD_N, KPD_O, KPD_P, KPD_Q, KPD_R,
|
||||
KPD_S, KPD_T, KPD_U, KPD_V, KPD_W, KPD_X,
|
||||
KPD_Y, KPD_Z, KPD_SPACE, KPD_OK, KPD_CANCEL,
|
||||
KPD_DEL, KPD_CAPS, KPD_0, KPD_1, KPD_2, KPD_3,
|
||||
KPD_4, KPD_5, KPD_6, KPD_7, KPD_8, KPD_9,
|
||||
KPD_MAX,
|
||||
KPD_NOWHERE = 254,
|
||||
KPD_INPUT = 255,
|
||||
};
|
||||
|
||||
struct SimpleKey{
|
||||
SimpleKey( string _ds, int _id);
|
||||
string displayValue;
|
||||
unsigned char id;
|
||||
unsigned char adjacency[4];
|
||||
};
|
||||
|
||||
class SimplePad{
|
||||
public:
|
||||
friend class GameSettings;
|
||||
|
||||
string buffer;
|
||||
string title;
|
||||
int cursorPos();
|
||||
bool isActive() {return bActive;};
|
||||
void Render();
|
||||
void Update(float dt);
|
||||
void pressKey(unsigned char id);
|
||||
|
||||
|
||||
|
||||
SimplePad(bool numbers=false);
|
||||
~SimplePad();
|
||||
|
||||
int mX; int mY;
|
||||
|
||||
private:
|
||||
void linkKeys(int from, int to, int dir);
|
||||
SimpleKey * Add(string display, unsigned char id);
|
||||
void MoveSelection(unsigned char dir);
|
||||
void Start(string value, string * _dest=NULL);
|
||||
string Finish();
|
||||
|
||||
bool bActive;
|
||||
bool bCapslock;
|
||||
bool bShowCancel, bShowNumpad;
|
||||
bool bCanceled;
|
||||
int nbitems;
|
||||
int cursor;
|
||||
int selected;
|
||||
int priorKey; //The prior key from those places.
|
||||
SimpleKey * keys[KPD_MAX];
|
||||
string * dest;
|
||||
string original; //For cancelling.
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
@@ -1,46 +1,46 @@
|
||||
#ifndef _UTILS_H_
|
||||
#define _UTILS_H_
|
||||
|
||||
#include <JGE.h>
|
||||
|
||||
#if defined (WIN32) || defined (LINUX)
|
||||
|
||||
#else
|
||||
#include <pspkernel.h>
|
||||
#include <pspdisplay.h>
|
||||
#include <pspctrl.h>
|
||||
#include <pspiofilemgr.h>
|
||||
#include <pspdebug.h>
|
||||
#include <psputility.h>
|
||||
#include <pspgu.h>
|
||||
#include <psprtc.h>
|
||||
#ifndef _UTILS_H_
|
||||
#define _UTILS_H_
|
||||
|
||||
#include <JGE.h>
|
||||
|
||||
#if defined (WIN32) || defined (LINUX)
|
||||
|
||||
#else
|
||||
#include <pspkernel.h>
|
||||
#include <pspdisplay.h>
|
||||
#include <pspctrl.h>
|
||||
#include <pspiofilemgr.h>
|
||||
#include <pspdebug.h>
|
||||
#include <psputility.h>
|
||||
#include <pspgu.h>
|
||||
#include <psprtc.h>
|
||||
|
||||
#include <psptypes.h>
|
||||
#include <malloc.h>
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
#include <string>
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
#include <algorithm>
|
||||
#include <stdlib.h>
|
||||
|
||||
|
||||
using std::string;
|
||||
|
||||
|
||||
|
||||
int filesize(const char * filename);
|
||||
int fileExists(const char * filename);
|
||||
|
||||
#ifdef LINUX
|
||||
void dumpStack();
|
||||
#endif
|
||||
|
||||
#include <malloc.h>
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
#include <string>
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
#include <algorithm>
|
||||
#include <stdlib.h>
|
||||
|
||||
|
||||
using std::string;
|
||||
|
||||
|
||||
|
||||
int filesize(const char * filename);
|
||||
int fileExists(const char * filename);
|
||||
|
||||
#ifdef LINUX
|
||||
void dumpStack();
|
||||
#endif
|
||||
|
||||
|
||||
/* RAM simple check functions header */
|
||||
|
||||
@@ -56,7 +56,14 @@ void dumpStack();
|
||||
|
||||
u32 ramAvailableLineareMax (void);
|
||||
u32 ramAvailable (void);
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef WIN32
|
||||
#include <direct.h>
|
||||
#define MAKEDIR(name) mkdir(name)
|
||||
#else
|
||||
#include <sys/stat.h>
|
||||
#define MAKEDIR(name) mkdir(name, 0777)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user