5 Commits

Author SHA1 Message Date
xawotihs
a2f510bbd5 Still trying to repair cross compilation 2019-09-07 22:47:45 +02:00
xawotihs
4605d38982 Including cinttypes only when supported by compiler 2019-09-07 21:44:43 +02:00
xawotihs
d9452b02d9 Adds <cinttypes> for definition of uint64_t 2019-09-07 21:32:22 +02:00
xawotihs
1cfee14caa Put back <stdint.h> to avoid having to change the android compilation options 2019-09-07 20:27:05 +02:00
xawotihs
fd3777f08e Now compile with VS2019 2019-09-07 19:46:15 +02:00
965 changed files with 236099 additions and 396720 deletions

View File

@@ -1,5 +1,5 @@
language: cpp
dist: xenial
dist: trusty
branches:
except:
- latest-master
@@ -19,14 +19,14 @@ before_install:
export PSPDEV="$TRAVIS_BUILD_DIR/opt/pspsdk" &&
export PSPSDK="$PSPDEV/psp/sdk" &&
export PATH="$PATH:$PSPDEV/bin:$PSPSDK/bin" &&
wget --no-check-certificate -O sdk.lzma http://downloads.sourceforge.net/project/minpspw/SDK%20%2B%20devpak/pspsdk%200.11.2/minpspw_0.11.2-amd64.tar.lzma;
wget -O sdk.lzma http://downloads.sourceforge.net/project/minpspw/SDK%20%2B%20devpak/pspsdk%200.11.2/minpspw_0.11.2-amd64.tar.lzma;
fi
# Building for Qt here
- if [ "$BUILD_Qt" == "YES" ]; then
sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu xenial universe" &&
sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu xenial main" &&
sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu trusty universe" &&
sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu trusty main" &&
sudo apt-get -qq update &&
sudo apt-get -qq install qt5-qmake qtbase5-dev qtdeclarative5-dev qttools5-dev qtmultimedia5-dev libqt5opengl5 libqt5opengl5-dev pulseaudio libpulse-dev &&
sudo apt-get -qq install qt5-qmake qtbase5-dev qtdeclarative5-dev qttools5-dev qtmultimedia5-dev pulseaudio libpulse-dev &&
export QMAKE="qmake -qt=qt5";
fi
# Building for Android here
@@ -35,8 +35,8 @@ before_install:
if [ `uname -m` = x86_64 ]; then
sudo dpkg --add-architecture i386 && sudo apt-get update &&
sudo apt-get install -qq --force-yes libgd2-xpm-dev libc6-i386 lib32stdc++6 lib32gcc1 lib32ncurses5 lib32z1 jq ant; fi &&
wget https://dl.google.com/android/repository/android-ndk-r22-linux-x86_64.zip -nv &&
wget http://dl.google.com/android/android-sdk_r24.4.1-linux.tgz -nv;
wget http://dl.google.com/android/ndk/android-ndk-r9-linux-x86_64.tar.bz2 -nv &&
wget http://dl.google.com/android/android-sdk_r24.3.4-linux.tgz -nv;
fi
install:
@@ -44,21 +44,22 @@ install:
tar -x --xz -f sdk.lzma;
fi
- if [ "$BUILD_ANDROID" == "YES" ]; then
unzip android-ndk-r22-linux-x86_64.zip &&
tar -zxf android-sdk_r24.4.1-linux.tgz &&
tar --absolute-names -jxf android-ndk-r9-linux-x86_64.tar.bz2 &&
tar -zxf android-sdk_r24.3.4-linux.tgz &&
$ANDROID list sdk --extended -a &&
echo yes | $ANDROID update sdk -a -t tools,platform-tools,build-tools-23.0.1,android-23 --no-ui --force --no-https;
sudo apt-get install openjdk-8-jdk;
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64;
export PATH=$JAVA_HOME/bin:$PATH;
echo yes | $ANDROID update sdk -a -t tools,platform-tools,build-tools-23.0.1,android-10 --no-ui --force --no-https;
fi
- sudo pip install --upgrade pip
- sudo pip install setuptools-rust
- sudo pip install pyOpenSSL
- sudo python -m easy_install --upgrade pyOpenSSL
- sudo pip install pyjavaproperties
- sudo pip install github3.py
- sudo pip install cpp-coveralls
env:
global:
- secure: "EBzr1+qjQsOhn0s+tcFmXR1jP9B0xiOSXuXbRXWZ1OEHNvp8+A5/pS84LYVFlaZqmxr5dApxvPtwhgLIUbQ3EPXm8LpC3KgSD4dS+9/QMbxhe5TK4oczgFRGcDTMJQZsCzhOh7hp3tbcbJg5Gp+VT7aFjFQSHDGwhzSJXsXwh/8="
- secure: "X5dTQfofqAutnXxmu11Ep2MQ5QYnMN8m0AITRtwymhEF2UclcOudI1+skPtuhAGbWQnSO+lhunV3cvMfw2/Ml3k/VDz6VdFSKFrzAu7ja1VLJfcxr7chi0s8q30pVBb66tGydjIBac3B+RQyqgmZQW1frbRrhC/kPFQ6wPWOJdQ="
- secure: "T97NUPnxCpVZ/c5HH0zfo0FO3DPSRMSmze58ubW5EUTZOjAMtEt+OFdsrNZvUTCugUj2M1agtonZbAbczpaAL+lgZcHDgXgWMkfO0pMnsWX1yyCNqMuE/iTMpJr/xsLQeyWlftWjJLsseQU45abZsd1XVmda/G+ZhrDLF1y55SA="
script: "tools/travis-script.sh"
after_success:

View File

@@ -20,7 +20,7 @@ namespace boost {
enum xtime_clock_types
{
TIME_UTC_=1
TIME_UTC=1
// TIME_TAI,
// TIME_MONOTONIC,
// TIME_PROCESS,
@@ -68,7 +68,7 @@ inline xtime get_xtime(boost::system_time const& abs_time)
inline int xtime_get(struct xtime* xtp, int clock_type)
{
if (clock_type == TIME_UTC_)
if (clock_type == TIME_UTC)
{
*xtp=get_xtime(get_system_time());
return clock_type;

View File

@@ -350,7 +350,7 @@ namespace boost
cond.timed_wait(lock, xt);
# endif
xtime cur;
xtime_get(&cur, TIME_UTC_);
xtime_get(&cur, TIME_UTC);
if (xtime_cmp(xt, cur) <= 0)
return;
}
@@ -365,7 +365,7 @@ namespace boost
BOOST_VERIFY(!pthread_yield());
# else
xtime xt;
xtime_get(&xt, TIME_UTC_);
xtime_get(&xt, TIME_UTC);
sleep(xt);
# endif
}

View File

@@ -20,8 +20,8 @@ const int NANOSECONDS_PER_MICROSECOND = 1000;
inline void to_time(int milliseconds, boost::xtime& xt)
{
int res = 0;
res = boost::xtime_get(&xt, boost::TIME_UTC_);
BOOST_ASSERT(res == boost::TIME_UTC_);
res = boost::xtime_get(&xt, boost::TIME_UTC);
BOOST_ASSERT(res == boost::TIME_UTC);
xt.sec += (milliseconds / MILLISECONDS_PER_SECOND);
xt.nsec += ((milliseconds % MILLISECONDS_PER_SECOND) *
@@ -57,8 +57,8 @@ inline void to_timespec_duration(const boost::xtime& xt, timespec& ts)
{
boost::xtime cur;
int res = 0;
res = boost::xtime_get(&cur, boost::TIME_UTC_);
BOOST_ASSERT(res == boost::TIME_UTC_);
res = boost::xtime_get(&cur, boost::TIME_UTC);
BOOST_ASSERT(res == boost::TIME_UTC);
if (boost::xtime_cmp(xt, cur) <= 0)
{
@@ -88,8 +88,8 @@ inline void to_duration(boost::xtime xt, int& milliseconds)
{
boost::xtime cur;
int res = 0;
res = boost::xtime_get(&cur, boost::TIME_UTC_);
BOOST_ASSERT(res == boost::TIME_UTC_);
res = boost::xtime_get(&cur, boost::TIME_UTC);
BOOST_ASSERT(res == boost::TIME_UTC);
if (boost::xtime_cmp(xt, cur) <= 0)
milliseconds = 0;
@@ -110,8 +110,8 @@ inline void to_microduration(boost::xtime xt, int& microseconds)
{
boost::xtime cur;
int res = 0;
res = boost::xtime_get(&cur, boost::TIME_UTC_);
BOOST_ASSERT(res == boost::TIME_UTC_);
res = boost::xtime_get(&cur, boost::TIME_UTC);
BOOST_ASSERT(res == boost::TIME_UTC);
if (boost::xtime_cmp(xt, cur) <= 0)
microseconds = 0;

File diff suppressed because it is too large Load Diff

View File

@@ -474,7 +474,7 @@
#ifndef PNG_VERSION_INFO_ONLY
/* include the compression library's header */
#include "../include/zlib.h"
#include "zlib.h"
#endif
/* include all user configurable info, including optional assembler routines */

View File

@@ -84,7 +84,7 @@ OBJS = $(GENERIC_OBJS) $(LINUX_OBJS)
TARGET_LIB = libjge.a
TARGET_HGE = libhgetools.a
INCDIR = $(shell freetype-config --cflags 2> /dev/null) -I/usr/X11/include -I/usr/include/boost -Isrc/zipFS -Iinclude/
CXXFLAGS += -DLINUX -DNETWORK_SUPPORT $(FMOD)
CXXFLAGS += -DLINUX $(FMOD)
CXXFLAGS += $(INCDIR)
LIBDIR = lib/linux
endif

View File

@@ -25,6 +25,7 @@ std::string ToHex(T* pointer)
#ifdef LINUX
#define OutputDebugString(val) (std::cerr << val);
#define OutputDebugStringA(val) (std::cerr << val);
#endif
#ifdef _DEBUG

View File

@@ -394,7 +394,6 @@ class JGE
void SetJNIEnv(JNIEnv * env, jclass cls);
void sendJNICommand(std::string command);
std::string getFileSystemLocation();
std::string getFileUserFolderPath();
#endif
protected:

View File

@@ -30,7 +30,6 @@ const int kInfoMenuID = -200;
const int kRandomPlayerMenuID = -11;
const int kRandomAIPlayerMenuID = -12;
const int kEvilTwinMenuID = -14;
const int kCommanderMenuID = -33;
class JGuiListener
{

View File

@@ -2,7 +2,6 @@
#define _JSOCKET_H_
#include <queue>
#include "Threading.h"
using namespace std;
#define SERVER_PORT 5001

View File

@@ -26,8 +26,16 @@
#include "JAudio.h"
#else
#ifdef IOS
#include <tr1/cstdint>
#else
#include <stdint.h>
//#include <cstdint>
#endif
//#include <stdint.h>
//the MSC version might only define _MSC_STDINT_H_
//and that might cause redefinition of standard types
//#define _STDINT_H_
#endif
@@ -140,9 +148,14 @@ typedef uint32_t u32;
#include <GLES/gl.h>
#include <GLES/glext.h>
#elif defined (WIN32) || defined (LINUX)
#if defined(__APPLE__)
#include <OpenGL/gl.h>
#include <OpenGL/glu.h>
#else
#include <GL/gl.h>
#include <GL/glu.h>
#endif
#endif
#else
#include <QtOpenGL>
#endif

View File

@@ -1,7 +1,7 @@
#ifndef THREADING_H
#define THREADING_H
#if !defined(PSP) && !defined(QT_CONFIG) && !(__cplusplus > 199711L)
#if !defined(PSP) && !defined(QT_CONFIG) && !(__cplusplus > 199711L) && !(_MSC_VER >= 1700)
#include <boost/date_time.hpp>
#ifdef WIN32
@@ -537,7 +537,7 @@ namespace boost
}
}
#elif (__cplusplus > 199711L)
#elif (__cplusplus > 199711L) || (_MSC_VER >= 1700)
#include <thread>
#include <mutex>

View File

@@ -131,11 +131,10 @@ JFileSystem::JFileSystem(const string & _userPath, const string & _systemPath)
systemPath = [[documentsDirectory stringByAppendingString: @"/Res/"] cStringUsingEncoding:1];
#elif defined (ANDROID)
userPath = JGE::GetInstance()->getFileUserFolderPath();
systemPath = JGE::GetInstance()->getFileSystemLocation();
userPath = JGE::GetInstance()->getFileSystemLocation();
systemPath = "";
DebugTrace("User path " << userPath);
DebugTrace("System path " << systemPath);
DebugTrace("User path " << userPath);
#elif defined (QT_CONFIG)
QDir sysDir(RESDIR);
@@ -260,7 +259,6 @@ void JFileSystem::clearZipCache()
bool JFileSystem::AttachZipFile(const string &zipfile, char *password /* = NULL */)
{
#ifndef WIN32
if (mZipAvailable && mZipFile.is_open())
{
if (mZipFileName != zipfile)
@@ -268,7 +266,7 @@ bool JFileSystem::AttachZipFile(const string &zipfile, char *password /* = NULL
else
return true;
}
#endif
mZipFileName = zipfile;
mPassword = password;

View File

@@ -668,7 +668,7 @@ string JGE::getFileSystemLocation()
if (env == NULL)
{
DebugTrace("An Error Occurred in getting the JNI Environment whie trying to get the system folder location. Defaulting to /mnt/sdcard/net.wagic.app/Wagic");
return "/mnt/sdcard/Wagic/Res";
return "/mnt/sdcard/Wagic";
};
jclass jniClass = env->FindClass("org/libsdl/app/SDLActivity");
@@ -677,36 +677,7 @@ string JGE::getFileSystemLocation()
if (methodId == 0)
{
DebugTrace("An Error Occurred in getting the JNI methodID for getSystemFolderPath. Defaulting to /mnt/sdcard/Wagic");
return "/mnt/sdcard/Wagic/Res";
};
jstring systemPath = (jstring) env->CallStaticObjectMethod(jniClass, methodId);
// Now convert the Java String to C++ char array
const char* cstr = env->GetStringUTFChars(systemPath, 0);
string retVal (cstr);
env->ReleaseStringUTFChars(systemPath, cstr);
env->DeleteLocalRef(systemPath);
return retVal;
}
string JGE::getFileUserFolderPath()
{
JNIEnv * env = getJNIEnv();
if (env == NULL)
{
DebugTrace("An Error Occurred in getting the JNI Environment whie trying to get the system folder location. Defaulting to /mnt/sdcard/net.wagic.app/Wagic");
return "/mnt/sdcard/Wagic/User";
};
jclass jniClass = env->FindClass("org/libsdl/app/SDLActivity");
jmethodID methodId = env->GetStaticMethodID( jniClass, "getUserFolderPath", "()Ljava/lang/String;");
if (methodId == 0)
{
DebugTrace("An Error Occurred in getting the JNI methodID for getSystemFolderPath. Defaulting to /mnt/sdcard/Wagic");
return "/mnt/sdcard/Wagic/User";
return "/mnt/sdcard/Wagic";
};
jstring systemPath = (jstring) env->CallStaticObjectMethod(jniClass, methodId);

View File

@@ -197,7 +197,7 @@ bool JGuiController::CheckUserInput(JButton key)
mObjects[mCurr]->Entering();
}
mEngine->LeftClickedProcessed();
mEngine->ResetInput();
mEngine->ResetInput();
return true;
}
mEngine->LeftClickedProcessed();

View File

@@ -4,6 +4,8 @@
*/
#define __STDC_LIMIT_MACROS
#include "../include/DebugRoutines.h"
#include "../include/JNetwork.h"

View File

@@ -18,11 +18,6 @@
#include <stdexcept>
#include <iostream>
#include <math.h>
#ifndef WIN32
#include <unistd.h>
#endif
#include <stdio.h>
#include <stdlib.h>
#if (defined FORCE_GLES)
#undef GL_ES_VERSION_2_0
@@ -58,7 +53,6 @@ JGameLauncher* g_launcher = NULL;
#ifdef ANDROID
JNIEnv * mJNIEnv = NULL;
jclass * mJNIClass = NULL;
int SDL_ResumeSyncTime = 0;
#endif
class SdlApp;
@@ -84,7 +78,6 @@ extern "C" void Java_org_libsdl_app_SDLActivity_nativeResume(
{
if (!g_engine)
return;
SDL_ResumeSyncTime = 100000;
g_engine->Resume();
}
@@ -143,16 +136,8 @@ public:
if(!g_engine->IsPaused())
OnEvent(&Event);
}
if(!g_engine->IsPaused()){
#ifdef ANDROID
// Fix for SDL crash on resuming Android app from background.
if(SDL_ResumeSyncTime){
usleep(SDL_ResumeSyncTime);
SDL_ResumeSyncTime = 0;
}
#endif
if(!g_engine->IsPaused())
OnUpdate();
}
}
}

View File

@@ -184,13 +184,7 @@ JMusic *JSoundSystem::LoadMusic(const char *fileName)
const SLboolean req[2] = {SL_BOOLEAN_TRUE, SL_BOOLEAN_TRUE};
result = (*engineEngine)->CreateAudioPlayer(engineEngine, &music->playerObject, &audioSrc, &audioSnk, 2, ids, req);
DebugTrace("result " << result);
if(result == SL_RESULT_MEMORY_FAILURE){
delete music;
mCurrentMusic = NULL;
return NULL;
}
// realize the player
result = (*music->playerObject)->Realize(music->playerObject, SL_BOOLEAN_FALSE);
DebugTrace("result " << result);
@@ -309,12 +303,6 @@ JSample *JSoundSystem::LoadSample(const char *fileName)
1, ids, req);
DebugTrace("result " << result);
if(result == SL_RESULT_MEMORY_FAILURE){
delete sample;
mCurrentSample = NULL;
return NULL;
}
// realize the player
result = (*sample->playerObject)->Realize(sample->playerObject, SL_BOOLEAN_FALSE);
DebugTrace("result " << result);

View File

@@ -1,10 +1,14 @@
#define __STDC_LIMIT_MACROS
#include "../../include/DebugRoutines.h"
#include "Threading.h"
#include <errno.h>
#ifdef WIN32
#pragma comment(lib,"WSOCK32.LIB")
#include <stdio.h>
#include <conio.h>
#include <winsock.h>
#include <winsock.h>
#include <fcntl.h>
#elif LINUX
#include <unistd.h>
@@ -16,7 +20,6 @@
#endif //WINDOWS
#include "../../include/JSocket.h"
#include "../../include/DebugRoutines.h"
JSocket::JSocket(string ipAddr)
@@ -48,9 +51,7 @@ JSocket::JSocket(string ipAddr)
#ifdef WIN32
unsigned int addr_dest = inet_addr(ipAddr.c_str());
hostentptr = gethostbyaddr((char*) &addr_dest, 4, AF_INET);
if (hostentptr == NULL)
hostentptr = gethostbyname(ipAddr.c_str()); // Fix for Windows if IP Address cannot be resolved.
hostentptr=gethostbyaddr((char*) &addr_dest, 4, AF_INET);
#elif LINUX
hostentptr = gethostbyname(ipAddr.c_str());
#endif

View File

@@ -1,7 +1,7 @@
#Wagic the Homebrew
[![Build Status](https://travis-ci.org/WagicProject/wagic.png?branch=master)](https://travis-ci.com/WagicProject/wagic)
[![Build Status](https://travis-ci.org/WagicProject/wagic.png?branch=master)](https://travis-ci.org/WagicProject/wagic)
[![Build status](https://ci.appveyor.com/api/projects/status/7j4fbr6m62aqej59/branch/master)](https://ci.appveyor.com/project/xawotihs/wagic/branch/master)
[![Coverage Status](https://coveralls.io/repos/WagicProject/wagic/badge.png?branch=master)](https://coveralls.io/r/WagicProject/wagic?branch=master)

View File

@@ -1,28 +1,16 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
android:versionCode="0231"
android:installLocation="preferExternal"
android:versionName="@string/app_version"
package="net.wagic.app">
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<application android:icon="@drawable/icon"
android:label="@string/app_name"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen">
<activity android:debuggable="false"
android:configChanges="keyboard|keyboardHidden|orientation"
android:label="@string/app_name"
android:name="org.libsdl.app.SDLActivity"
android:screenOrientation="sensorLandscape">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
<uses-sdk android:minSdkVersion="10"
android:targetSdkVersion="29" />
</manifest>
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="0201" android:versionName="@string/app_version" package="net.wagic.app">
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<application android:icon="@drawable/icon" android:label="@string/app_name" android:theme="@android:style/Theme.NoTitleBar.Fullscreen">
<activity android:debuggable="false" android:configChanges="keyboard|keyboardHidden|orientation" android:label="@string/app_name" android:name="org.libsdl.app.SDLActivity" android:screenOrientation="sensorLandscape">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
</application>
<uses-sdk android:minSdkVersion="10" android:targetSdkVersion="10"/>
</manifest>

View File

@@ -8,4 +8,4 @@
# project structure.
# Project target.
target=android-23
target=android-10

View File

@@ -12,7 +12,7 @@ BOOST_PATH := $(MY_WAGIC_ROOT)/Boost
JPEG_PATH := $(JGE_PATH)/Dependencies/libjpeg
PNG_PATH := $(JGE_PATH)/Dependencies/libpng
LOCAL_CFLAGS += -DLINUX -DANDROID -DSDL_CONFIG -DNETWORK_SUPPORT
LOCAL_CFLAGS += -DLINUX -DANDROID -DSDL_CONFIG
LOCAL_CFLAGS += -D_STLP_USE_SIMPLE_NODE_ALLOC -DTIXML_USE_STL
LOCAL_CFLAGS += -D__arm__ -D_REENTRANT -D_GLIBCXX__PTHREADS
LOCAL_STATIC_LIBRARIES := libpng libjpeg
@@ -133,7 +133,6 @@ LOCAL_SRC_FILES := $(SDL_PATH)/src/main/android/SDL_android_main.cpp \
$(MTG_PATH)/src/WFilter.cpp \
$(MTG_PATH)/src/WFont.cpp \
$(MTG_PATH)/src/WGui.cpp \
$(MTG_PATH)/src/WParsedInt.cpp \
$(MTG_PATH)/src/WResourceManager.cpp \
$(MTG_PATH)/src/DeckView.cpp \
$(MTG_PATH)/src/CarouselDeckView.cpp \

View File

@@ -1,8 +1,8 @@
APP_PROJECT_PATH := $(call my-dir)/..
APP_CPPFLAGS += -frtti -fexceptions
APP_ABI := armeabi-v7a
APP_ABI := armeabi armeabi-v7a
#APP_ABI := x86 # mainly for emulators
APP_STL := c++_static
APP_STL := gnustl_static
APP_MODULES := libpng libjpeg main SDL
#APP_OPTIM is 'release' by default

View File

@@ -11,4 +11,4 @@
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
# Project target.
target=android-23
target=android-10

View File

@@ -4,7 +4,6 @@
android:id="@+id/mainLayout"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:keepScreenOn="true"
>
<TextView
android:layout_width="fill_parent"

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Wagic</string>
<string name="app_version">0.23.1</string>
<string name="info_text">All Rights Reserved.</string>
<string name="app_version">0.20.1</string>
<string name="info_text">Wagic v0.20.1\\nAll Rights Reserved.</string>
</resources>

View File

@@ -16,7 +16,7 @@ public class DeckImporter
String message = "";
String deck = "";
String deckname = "";
String prefix = "";
String prefix = "#SB:";
int cardcount = 0;
if(f.exists() && !f.isDirectory())
{
@@ -36,14 +36,7 @@ public class DeckImporter
{
String line = scanner.nextLine();
line = line.trim();
if (line.equals("")) {
line = scanner.nextLine();
prefix = "#SB:"; // Sideboard started from next card.
if (line.equals("")) {
line = scanner.nextLine(); // Sometimes there are 2 blank lines from main deck and sideboard.
}
}
if (!line.equals("")) // don't write out blank lines
if (!line.equals("") && cardcount < 61) // don't write out blank lines
{
String[] slines = line.split("\\s+");
String arranged = "";
@@ -57,57 +50,60 @@ public class DeckImporter
{
arranged = arranged.substring(5);
slines[1] = slines[1].replaceAll("\\[", "").replaceAll("\\]", "");
deck += prefix + arranged + " (" + renameSet(slines[1]) + ") * " + slines[0] + "\n";
deck += arranged + " (" + renameSet(slines[1]) + ") * " + slines[0] + "\n";
} else
{
deck += prefix + arranged + "(*) * " + slines[0] + "\n";
deck += arranged + "(*) * " + slines[0] + "\n";
}
cardcount += Integer.parseInt(slines[0]);
}
}
}
File profile = new File(activePath + "/User/settings/options.txt");
String profileName = "Default";
File profile = new File(activePath + "/Res/settings/options.txt");
if (profile.exists() && !profile.isDirectory())
profileName = getActiveProfile(profile);
File rootDecks = null;
if (!profileName.equalsIgnoreCase("Default"))
rootDecks = new File(activePath + "/User/profiles/" + profileName);
else
rootDecks = new File(activePath + "/User/player/");
if (rootDecks.exists() && rootDecks.isDirectory())
{
//save deck
int countdeck = 1;
File[] files = rootDecks.listFiles();
for (int i = 0; i < files.length; i++)
{//check if there is available deck...
if (files[i].getName().startsWith("deck"))
countdeck++;
}
File toSave = new File(rootDecks + "/deck" + countdeck + ".txt");
try
String profileName = getActiveProfile(profile);
if (profileName != "Missing!")
{
FileOutputStream fop = new FileOutputStream(toSave);
// if file doesn't exists, then create it
if (!toSave.exists())
File rootProfiles = new File(activePath + "/Res/profiles/" + profileName);
if (rootProfiles.exists() && rootProfiles.isDirectory())
{
toSave.createNewFile();
//save deck
int countdeck = 1;
File[] files = rootProfiles.listFiles();
for (int i = 0; i < files.length; i++)
{//check if there is available deck...
if (files[i].getName().startsWith("deck"))
countdeck++;
}
File toSave = new File(rootProfiles + "/deck" + countdeck + ".txt");
try
{
FileOutputStream fop = new FileOutputStream(toSave);
// if file doesn't exists, then create it
if (!toSave.exists())
{
toSave.createNewFile();
}
// get the content in bytes
byte[] contentInBytes = deck.getBytes();
fop.write(contentInBytes);
fop.flush();
fop.close();
message = "Import Deck Success!\n" + cardcount + " total cards in this deck\n\n" + deck;
} catch (IOException e)
{
message = e.getMessage();
}
} else
{
message = "Missing Folder!";
}
// get the content in bytes
byte[] contentInBytes = deck.getBytes();
fop.write(contentInBytes);
fop.flush();
fop.close();
message = "The deck has been successfully imported as: " + toSave.getName() + "\n" + cardcount + " total cards in this deck\n\n" + deck;
} catch (IOException e)
{
message = e.getMessage();
}
} else
{
message = "Problem opening decks folder: " + rootDecks.getAbsolutePath();
message = "Invalid Profile!";
}
} else
{
@@ -147,12 +143,12 @@ public class DeckImporter
}
else
{
return "Default";
return "Missing!";
}
}
catch(IOException e)
{
return "Default";
return "Missing!";
}
return name;
}

File diff suppressed because it is too large Load Diff

View File

@@ -23,7 +23,7 @@ public class StorageOptions
public static int count = 0;
public static String defaultMountPoint;
public static void determineStorageOptions(android.content.Context mContext)
public static void determineStorageOptions()
{
initializeMountPoints();
if (findForcemount()){
@@ -36,16 +36,6 @@ public class StorageOptions
}
compareMountsWithVold();
testAndCleanMountsList();
File[] externalStorageVolumes = mContext.getExternalFilesDirs("");
for(int i = 0; i < externalStorageVolumes.length; i++){
mMounts.add(externalStorageVolumes[i].getAbsolutePath());
}
for(int i = 0; i < mMounts.size(); i++){
for(int j = 0; j < mMounts.size(); j++){
if(i!=j && mMounts.get(i).startsWith(mMounts.get(j)))
mMounts.remove(i);
}
}
setProperties();
}
@@ -274,22 +264,22 @@ public class StorageOptions
for (String path : mMounts)
{//with forcemount menu
if ("/mnt/sdcard".equalsIgnoreCase(path) || "/storage/sdcard0".equalsIgnoreCase(path))
mLabels.add("Internal SD " + "[" + path + "/]");
mLabels.add("Internal SD " + "[" + path + "]");
else if (path.contains("emulated"))
mLabels.add("Emulated SD " + " [" + path + "/]");
mLabels.add("Emulated SD " + " [" + path + "]");
else
mLabels.add("External SD " + " [" + path + "/]");
mLabels.add("External SD " + " [" + path + "]");
}
}
else
{
for (String path : mMounts)
{
// TODO: /mnt/sdcard and emulated are assumed to always mean internal storage. Use this comparison until there is a better way to do this
if ("/mnt/sdcard".equalsIgnoreCase(path) || path.contains("emulated"))
mLabels.add("Built-in Storage " + "[" + path + "/]");
// TODO: /mnt/sdcard is assumed to always mean internal storage. Use this comparison until there is a better way to do this
if ("/mnt/sdcard".equalsIgnoreCase(path))
mLabels.add("Built-in Storage");
else
mLabels.add("External SD Card " + "[" + path + "/]");
mLabels.add("External SD Card " + i++);
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -27,7 +27,7 @@ OBJS = objs/InteractiveButton.o objs/AbilityParser.o objs/ActionElement.o\
objs/ThisDescriptor.o objs/Token.o objs/Translate.o objs/TranslateKeys.o\
objs/Trash.o objs/utils.o objs/WEvent.o objs/WResourceManager.o\
objs/WCachedResource.o objs/WDataSrc.o objs/WGui.o objs/WFilter.o objs/Tasks.o\
objs/WFont.o objs/WParsedInt.o objs/CarouselDeckView.o objs/GridDeckView.o objs/DeckView.o
objs/WFont.o objs/CarouselDeckView.o objs/GridDeckView.o objs/DeckView.o
DEPS = $(patsubst objs/%.o, deps/%.d, $(OBJS))
RESULT = $(shell psp-config --psp-prefix 2> Makefile.cache)
@@ -68,7 +68,6 @@ EXTRA_TARGETS = EBOOT.PBP
PSP_EBOOT_TITLE = Wagic, the Homebrew?!
PSP_EBOOT_ICON = icon.png
#PSP_EBOOT_ICON1 = icon1.pmf
PSP_LARGE_MEMORY = 1
PSP_EBOOT_UNKPNG = pic0.png
PSP_EBOOT_PIC1 = pic1.png
INCDIR = ../../JGE/include ../../JGE/src/zipFS ../../JGE/include/psp ../../JGE/include/psp/freetype2 ../../JGE/src ../../projects/mtg/include ../../Boost
@@ -83,7 +82,7 @@ OBJS += objs/TestSuiteAI.o
INCDIR = -I../../JGE/include -I../../JGE/src -I/usr/X11/include -I../../projects/mtg/include -I/usr/include/boost -I../../JGE/src/zipFS
LIBDIR = -L../../JGE/lib/linux -L../../JGE -L/usr/X11/lib
LIBS = -ljge -lfreetype -ljpeg -lgif -lpng -lz -lm -lstdc++ -lhgetools -lGL -lGLU -lX11 -lpthread $(FMOD)
CFLAGS = $(INCDIR) -DLINUX -DNETWORK_SUPPORT -DUSE_PRECOMPILED_HEADERS=1 -DTIXML_USE_STL -Wno-nonnull-compare
CFLAGS = $(INCDIR) -DLINUX -DUSE_PRECOMPILED_HEADERS=1 -DTIXML_USE_STL -Wno-nonnull-compare
ASFLAGS = $(CXXFLAGS)
@@ -94,7 +93,7 @@ OBJS += objs/TestSuiteAI.o
INCDIR = -I../../JGE/include -I../../JGE/src -I/usr/X11/include -I../../projects/mtg/include -I../../Boost -I../../JGE/src/zipFS
LIBDIR = -L../../JGE/lib/linux -L../../JGE -L/usr/X11/lib -L../../Boost/lib
LIBS = -ljge -lfreetype -ljpeg -lgif -lpng -lz -lm -lstdc++ -lhgetools -lGL -lGLU -lX11 -lboost_thread $(FMOD)
CFLAGS = $(INCDIR) -DLINUX -DNETWORK_SUPPORT -DUSE_PRECOMPILED_HEADERS=1 -Wno-nonnull-compare
CFLAGS = $(INCDIR) -DLINUX -DUSE_PRECOMPILED_HEADERS=1 -Wno-nonnull-compare
ASFLAGS = $(CXXFLAGS)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 13 KiB

View File

Before

Width:  |  Height:  |  Size: 7.5 KiB

After

Width:  |  Height:  |  Size: 7.5 KiB

View File

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

Before

Width:  |  Height:  |  Size: 6.9 KiB

After

Width:  |  Height:  |  Size: 6.9 KiB

View File

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Some files were not shown because too many files have changed in this diff Show More