Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
YGOMobile
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fallenstardust
YGOMobile
Commits
4b74e797
Commit
4b74e797
authored
Apr 24, 2018
by
fallenstardust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
移除修改版本号功能
parent
19863e3d
Changes
11
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
38 additions
and
62 deletions
+38
-62
Classes/gframe/config.h
Classes/gframe/config.h
+1
-4
Classes/gframe/game.cpp
Classes/gframe/game.cpp
+1
-3
libcore/jni/Android.mk
libcore/jni/Android.mk
+0
-6
libcore/jni/version.cpp
libcore/jni/version.cpp
+0
-10
mobile/assets/data/conf/strings.conf
mobile/assets/data/conf/strings.conf
+2
-0
mobile/build.gradle
mobile/build.gradle
+2
-2
mobile/src/main/java/cn/garymb/ygomobile/AppsSettings.java
mobile/src/main/java/cn/garymb/ygomobile/AppsSettings.java
+19
-20
mobile/src/main/java/cn/garymb/ygomobile/ui/home/ResCheckTask.java
...c/main/java/cn/garymb/ygomobile/ui/home/ResCheckTask.java
+5
-5
mobile/src/main/java/cn/garymb/ygomobile/ui/preference/fragments/SettingFragment.java
...mb/ygomobile/ui/preference/fragments/SettingFragment.java
+3
-3
mobile/src/main/res/xml/preference_game.xml
mobile/src/main/res/xml/preference_game.xml
+1
-5
mobile/src/test/java/tests/A.java
mobile/src/test/java/tests/A.java
+4
-4
No files found.
Classes/gframe/config.h
View file @
4b74e797
...
...
@@ -2,9 +2,6 @@
#define __CONFIG_H
#pragma once
#define DEF_PRO_VERSION 0x1343
#ifndef __GAME_CONFIG
#define _IRR_STATIC_LIB_
#define IRR_COMPILE_WITH_DX9_DEV_PACK
...
...
@@ -112,7 +109,7 @@ using namespace io;
using
namespace
gui
;
using
namespace
os
;
extern
unsigned
short
PRO_VERSION
;
extern
const
unsigned
short
PRO_VERSION
;
extern
int
enable_log
;
extern
bool
exit_on_return
;
extern
bool
bot_mode
;
...
...
Classes/gframe/game.cpp
View file @
4b74e797
...
...
@@ -25,7 +25,7 @@
#include <COGLESDriver.h>
#endif
unsigned
short
PRO_VERSION
=
DEF_PRO_VERSION
;
const
unsigned
short
PRO_VERSION
=
0x1343
;
namespace
ygo
{
...
...
@@ -40,7 +40,6 @@ bool Game::Initialize() {
srand
(
time
(
0
));
irr
::
SIrrlichtCreationParameters
params
=
irr
::
SIrrlichtCreationParameters
();
#ifdef _IRR_ANDROID_PLATFORM_
PRO_VERSION
=
android
::
getIntSetting
(
app
,
"game_version"
,
PRO_VERSION
);
android
::
InitOptions
*
options
=
android
::
getInitOptions
(
app
);
glversion
=
options
->
getOpenglVersion
();
if
(
glversion
==
0
)
{
...
...
@@ -1582,7 +1581,6 @@ void Game::RefreshBot() {
void
Game
::
LoadConfig
()
{
wchar_t
wstr
[
256
];
if
(
gameConf
.
_init
)
return
;
PRO_VERSION
=
android
::
getIntSetting
(
appMain
,
"game_version"
,
PRO_VERSION
);
gameConf
.
_init
=
TRUE
;
gameConf
.
antialias
=
1
;
gameConf
.
serverport
=
7911
;
...
...
libcore/jni/Android.mk
View file @
4b74e797
...
...
@@ -6,12 +6,6 @@ IRRLICHT_PROJECT_PATH := $(LOCAL_PATH)
#LOCAL_SRC_FILES := $(IRRLICHT_PROJECT_PATH)/../irrlicht/lib/Android/$(TARGET_ARCH_ABI)/libIrrlicht.a
#include $(PREBUILT_STATIC_LIBRARY)
include
$(CLEAR_VARS)
LOCAL_MODULE
:=
game_version
LOCAL_SRC_FILES
:=
$(LOCAL_PATH)
/jni/version.cpp
include
$(BUILD_SHARED_LIBRARY)
include
$(CLEAR_VARS)
LOCAL_MODULE
:=
YGOMobile
...
...
libcore/jni/version.cpp
deleted
100644 → 0
View file @
19863e3d
#define __GAME_CONFIG
#include <jni.h>
#include "../Classes/gframe/config.h"
extern
"C"
{
JNIEXPORT
jint
JNICALL
Java_cn_garymb_ygomobile_core_GameConfig_getGameVersion
(
JNIEnv
*
env
,
jclass
clazz
)
{
return
(
jint
)
DEF_PRO_VERSION
;
}
}
mobile/assets/data/conf/strings.conf
View file @
4b74e797
...
...
@@ -888,3 +888,5 @@
!
setname
0
x114
空牙团 空牙団
!
setname
0
x115
闪刀 閃刀
!
setname
0
x1115
闪刀姬 閃刀姫
!
setname
0
x116
圣像骑士 パラディオン
!
setname
0
x117
魔神仪 魔神儀
\ No newline at end of file
mobile/build.gradle
View file @
4b74e797
...
...
@@ -9,8 +9,8 @@ android {
applicationId
"cn.garymb.ygomobile"
minSdkVersion
16
targetSdkVersion
22
versionCode
3
1090421
versionName
"3.
1.9
"
versionCode
3
2010424
versionName
"3.
2.1
"
vectorDrawables
.
useSupportLibrary
=
true
ndk
{
abiFilters
"armeabi-v7a"
,
"x86"
...
...
mobile/src/main/java/cn/garymb/ygomobile/AppsSettings.java
View file @
4b74e797
...
...
@@ -433,24 +433,23 @@ public class AppsSettings {
}
return
v
;
}
public
int
resetGameVersion
()
{
int
version
=
GameConfig
.
getVersion
();
if
(
getIntSettings
(
Constants
.
PREF_GAME_VERSION
,
0
)
==
0
)
{
//用户没设置过版本号
return
version
;
}
saveIntSettings
(
Constants
.
PREF_GAME_VERSION
,
GameConfig
.
getVersion
());
return
version
;
}
public
int
getGameVersion
()
{
return
getIntSettings
(
Constants
.
PREF_GAME_VERSION
,
GameConfig
.
getVersion
());
}
public
void
setGameVersion
(
int
v
)
{
saveIntSettings
(
Constants
.
PREF_GAME_VERSION
,
v
);
}
/* public int resetGameVersion() {
* int version = GameConfig.getVersion();
* if (getIntSettings(Constants.PREF_GAME_VERSION, 0) == 0) {
* //用户没设置过版本号
* return version;
* }
* saveIntSettings(Constants.PREF_GAME_VERSION, GameConfig.getVersion());
* return version;
* }
*
* public int getGameVersion() {
* return getIntSettings(Constants.PREF_GAME_VERSION, GameConfig.getVersion());
*}
*
* public void setGameVersion(int v) {
* saveIntSettings(Constants.PREF_GAME_VERSION, v);
}*/
public
String
getVersionString
(
int
value
)
{
int
last
=
(
value
&
0xf
);
...
...
@@ -459,7 +458,7 @@ public class AppsSettings {
return
String
.
format
(
"%X.%03X.%X"
,
b
,
m
,
last
);
}
public
int
getVersionValue
(
String
str
)
{
/*
public int getVersionValue(String str) {
str = str.trim().toLowerCase(Locale.US);
int v = -1;
if(str.contains(".")){
...
...
@@ -485,7 +484,7 @@ public class AppsSettings {
}
}
return v;
}
}
*/
public
void
saveSettings
(
String
key
,
String
value
)
{
if
(
"lastdeck"
.
equals
(
key
))
{
...
...
mobile/src/main/java/cn/garymb/ygomobile/ui/home/ResCheckTask.java
View file @
4b74e797
...
...
@@ -115,11 +115,11 @@ public class ResCheckTask extends AsyncTask<Void, Integer, Integer> {
AppsSettings
.
get
().
setUseExtraCards
(
false
);
}
}
if
(
needsUpdate
)
{
if
(
AppsSettings
.
get
().
resetGameVersion
()
==
0
){
VUiKit
.
show
(
mContext
,
mContext
.
getString
(
R
.
string
.
reset_game_ver_fail
));
}
}
/*
if (needsUpdate) {
*
if(AppsSettings.get().resetGameVersion() == 0){
*
VUiKit.show(mContext, mContext.getString(R.string.reset_game_ver_fail));
*
}
* }*/
//设置字体
new
ConfigManager
(
mSettings
.
getSystemConfig
()).
setFontSize
(
mSettings
.
getFontSize
());
// copyCoreConfig(new File(mSettings.getResourcePath(), GameSettings.CORE_CONFIG_PATH).getAbsolutePath());
...
...
mobile/src/main/java/cn/garymb/ygomobile/ui/preference/fragments/SettingFragment.java
View file @
4b74e797
...
...
@@ -79,7 +79,7 @@ public class SettingFragment extends PreferenceFragmentPlus {
addPreferencesFromResource
(
R
.
xml
.
preference_game
);
bind
(
PREF_GAME_PATH
,
mSettings
.
getResourcePath
());
bind
(
PREF_GAME_VERSION
,
mSettings
.
getVersionString
(
mSettings
.
getGameVersion
()));
//
bind(PREF_GAME_VERSION, mSettings.getVersionString(mSettings.getGameVersion()));
bind
(
PREF_SOUND_EFFECT
,
mSettings
.
isSoundEffect
());
bind
(
PREF_LOCK_SCREEN
,
mSettings
.
isLockSreenOrientation
());
bind
(
PREF_FONT_ANTIALIAS
,
mSettings
.
isFontAntiAlias
());
...
...
@@ -108,7 +108,7 @@ public class SettingFragment extends PreferenceFragmentPlus {
public
boolean
onPreferenceChange
(
Preference
preference
,
Object
value
)
{
super
.
onPreferenceChange
(
preference
,
value
);
if
(!
isInit
)
{
if
(
PREF_GAME_VERSION
.
equals
(
preference
.
getKey
()))
{
/*
if (PREF_GAME_VERSION.equals(preference.getKey())) {
int v = AppsSettings.get().getVersionValue(value.toString());
if (v > 0 && v <= AppsSettings.get().getVersionValue("0xF99F")) {
mSettings.setGameVersion(v);
...
...
@@ -122,7 +122,7 @@ public class SettingFragment extends PreferenceFragmentPlus {
}
return false;
}
}
}
*/
if
(
PREF_FONT_SIZE
.
equals
(
preference
.
getKey
()))
{
int
size
=
Constants
.
DEF_PREF_FONT_SIZE
;
try
{
...
...
mobile/src/main/res/xml/preference_game.xml
View file @
4b74e797
...
...
@@ -5,11 +5,7 @@
<Preference
android:key=
"pref_key_game_res_path"
android:persistent=
"true"
android:title=
"@string/settings_game_res_path"
/>
<EditTextPreference
android:key=
"game_version"
android:persistent=
"true"
android:title=
"@string/game_version"
android:title=
"@string/settings_game_res_path"
/>
<ListPreference
android:entries=
"@array/opengl_version"
...
...
mobile/src/test/java/tests/A.java
View file @
4b74e797
...
...
@@ -6,7 +6,7 @@ import java.util.Locale;
public
class
A
{
@Test
/*
@Test
public void testVersion() {
System.out.println(getVersionString(0x233E));
System.out.println(getVersionString(0xF99F));
...
...
@@ -15,7 +15,7 @@ public class A {
System.out.println(getVersionValue("1.034.00"));
System.out.println(getVersionValue("1.034.0"));
System.out.println(getVersionString(4928));
}
}
*/
public
String
getVersionString
(
int
value
)
{
int
last
=
(
value
&
0xf
);
...
...
@@ -24,7 +24,7 @@ public class A {
return
String
.
format
(
"%X.%03X.%X"
,
b
,
m
,
last
);
}
public
int
getVersionValue
(
String
str
)
{
/*
public int getVersionValue(String str) {
str = str.trim().toLowerCase(Locale.US);
int v = -1;
if(str.contains(".")){
...
...
@@ -50,5 +50,5 @@ public class A {
}
}
return v;
}
}
*/
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment