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
f33d84c9
Commit
f33d84c9
authored
Jul 19, 2021
by
fallenstardust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
启动参数
parent
bf9c83e7
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
19 deletions
+18
-19
Classes/gframe/gframe.cpp
Classes/gframe/gframe.cpp
+1
-1
libcore/src/main/java/cn/garymb/ygomobile/YGOMobileActivity.java
.../src/main/java/cn/garymb/ygomobile/YGOMobileActivity.java
+5
-13
libcore/src/main/java/cn/garymb/ygomobile/core/IrrlichtBridge.java
...rc/main/java/cn/garymb/ygomobile/core/IrrlichtBridge.java
+0
-4
mobile/src/main/java/cn/garymb/ygomobile/YGOStarter.java
mobile/src/main/java/cn/garymb/ygomobile/YGOStarter.java
+12
-1
No files found.
Classes/gframe/gframe.cpp
View file @
f33d84c9
...
...
@@ -77,7 +77,7 @@ int main(int argc, char* argv[]) {
wchar_t
fname
[
1024
];
char
*
tmp
=
sub_string
(
arg
,
2
);
BufferIO
::
DecodeUTF8
(
tmp
,
fname
);
__android_log_print
(
ANDROID_LOG_
INFO
,
"ygo"
,
"load cdb=%s"
,
tmp
);
__android_log_print
(
ANDROID_LOG_
DEBUG
,
"ygo"
,
"load cdb=%s"
,
tmp
);
ygo
::
dataManager
.
LoadDB
(
fname
);
delete
tmp
;
}
else
if
(
!
strcmp
(
arg
,
"-k"
))
{
// Keep on return
...
...
libcore/src/main/java/cn/garymb/ygomobile/YGOMobileActivity.java
View file @
f33d84c9
...
...
@@ -28,6 +28,7 @@ import android.widget.TextView;
import
android.widget.Toast
;
import
java.nio.ByteBuffer
;
import
java.util.Arrays
;
import
cn.garymb.ygodata.YGOGameOptions
;
import
cn.garymb.ygomobile.controller.NetworkController
;
...
...
@@ -411,6 +412,10 @@ public class YGOMobileActivity extends NativeActivity implements
@Override
public
ByteBuffer
getNativeInitOptions
()
{
NativeInitOptions
options
=
app
().
getNativeInitOptions
();
options
.
mArgvList
.
clear
();
if
(
mArgV
!=
null
)
{
options
.
mArgvList
.
addAll
(
Arrays
.
asList
(
mArgV
));
}
return
options
.
toNativeBuffer
();
}
...
...
@@ -517,17 +522,4 @@ public class YGOMobileActivity extends NativeActivity implements
}
super
.
surfaceRedrawNeeded
(
holder
);
}
@Override
public
int
getArgc
(){
return
mArgV
==
null
?
0
:
mArgV
.
length
;
}
@Override
public
String
getArgv
(
int
index
){
if
(
index
>=
0
&&
mArgV
!=
null
&&
index
<
mArgV
.
length
){
return
mArgV
[
index
];
}
return
null
;
}
}
libcore/src/main/java/cn/garymb/ygomobile/core/IrrlichtBridge.java
View file @
f33d84c9
...
...
@@ -211,9 +211,5 @@ public final class IrrlichtBridge {
int
getPositionX
();
int
getPositionY
();
int
getArgc
();
String
getArgv
(
int
index
);
}
}
mobile/src/main/java/cn/garymb/ygomobile/YGOStarter.java
View file @
f33d84c9
...
...
@@ -24,6 +24,7 @@ import java.io.File;
import
java.util.HashMap
;
import
cn.garymb.ygodata.YGOGameOptions
;
import
cn.garymb.ygomobile.core.IrrlichtBridge
;
import
cn.garymb.ygomobile.lite.R
;
import
cn.garymb.ygomobile.ui.plus.ViewTargetPlus
;
...
...
@@ -150,7 +151,14 @@ public class YGOStarter {
private
static
long
lasttime
=
0
;
public
static
void
startGame
(
Activity
activity
,
YGOGameOptions
options
)
{
/**
*
* @param activity
* @param options
* @param args 例如(播放完退出游戏):-r 1111.yrp
* 或者(播放完不退出游戏):-k -r 1111.yrp
*/
public
static
void
startGame
(
Activity
activity
,
YGOGameOptions
options
,
String
args
)
{
//如果距离上次加入游戏的时间大于1秒才处理
if
(
System
.
currentTimeMillis
()
-
lasttime
>=
1000
)
{
lasttime
=
System
.
currentTimeMillis
();
...
...
@@ -164,6 +172,9 @@ public class YGOStarter {
intent
.
putExtra
(
YGOGameOptions
.
YGO_GAME_OPTIONS_BUNDLE_KEY
,
options
);
intent
.
putExtra
(
YGOGameOptions
.
YGO_GAME_OPTIONS_BUNDLE_TIME
,
System
.
currentTimeMillis
());
}
if
(
args
!=
null
)
{
intent
.
putExtra
(
IrrlichtBridge
.
EXTRA_ARGV
,
args
.
split
(
" "
));
}
intent
.
setFlags
(
Intent
.
FLAG_ACTIVITY_NEW_TASK
);
Log
.
e
(
"YGOStarter"
,
"跳转前"
+
System
.
currentTimeMillis
());
activity
.
startActivity
(
intent
);
...
...
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