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
3144ceef
Commit
3144ceef
authored
Jul 19, 2021
by
kenan
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://github.com/fallenstardust/YGOMobile-cn-ko-en
# Conflicts: # Classes/gframe/gframe.cpp
parents
737665c8
4523dd9d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
21 deletions
+20
-21
Classes/gframe/gframe.cpp
Classes/gframe/gframe.cpp
+20
-21
No files found.
Classes/gframe/gframe.cpp
View file @
3144ceef
...
...
@@ -16,19 +16,18 @@ void ClickButton(irr::gui::IGUIElement* btn) {
ygo
::
mainGame
->
device
->
postEventFromUser
(
event
);
}
char
*
sub_string
(
const
char
*
str
,
int
start
,
int
count
=-
1
){
char
*
tmp
=
new
char
[
1024
];
int
len
=
strlen
(
str
);
int
index
=
0
;
if
(
count
<
0
){
count
=
len
-
start
;
}
for
(
int
j
=
start
;
j
<
len
&&
count
>
0
;
count
--
,
j
++
)
{
tmp
[
index
++
]
=
str
[
j
];
}
tmp
[
index
]
=
'\0'
;
return
tmp
;
char
*
tmp
=
new
char
[
1024
];
int
len
=
strlen
(
str
);
int
index
=
0
;
if
(
count
<
0
){
count
=
len
-
start
;
}
for
(
int
j
=
start
;
j
<
len
&&
count
>
0
;
count
--
,
j
++
)
{
tmp
[
index
++
]
=
str
[
j
];
}
tmp
[
index
]
=
'\0'
;
return
tmp
;
}
#ifdef _IRR_ANDROID_PLATFORM_
int
GetListBoxIndex
(
IGUIListBox
*
listbox
,
const
wchar_t
*
target
){
int
count
=
listbox
->
getItemCount
();
...
...
@@ -74,13 +73,13 @@ int main(int argc, char* argv[]) {
for
(
int
i
=
1
;
i
<
argc
;
++
i
)
{
char
*
arg
=
argv
[
i
];
#endif
if
(
arg
[
0
]
==
'-'
&&
arg
[
1
]
==
'e'
)
{
wchar_t
fname
[
1024
];
char
*
tmp
=
sub_string
(
arg
,
2
);
BufferIO
::
DecodeUTF8
(
tmp
,
fname
);
__android_log_print
(
ANDROID_LOG_DEBUG
,
"ygo"
,
"load cdb=%s"
,
tmp
);
ygo
::
dataManager
.
LoadDB
(
fname
);
delete
tmp
;
if
(
arg
[
0
]
==
'-'
&&
arg
[
1
]
==
'e'
)
{
wchar_t
fname
[
1024
];
char
*
tmp
=
sub_string
(
arg
,
2
);
BufferIO
::
DecodeUTF8
(
tmp
,
fname
);
__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
exit_on_return
=
false
;
keep_on_return
=
true
;
...
...
@@ -109,7 +108,7 @@ int main(int argc, char* argv[]) {
index
=
GetListBoxIndex
(
ygo
::
mainGame
->
lstReplayList
,
fname
);
}
ygo
::
mainGame
->
HideElement
(
ygo
::
mainGame
->
wMainMenu
);
ygo
::
mainGame
->
HideElement
(
ygo
::
mainGame
->
wMainMenu
);
ClickButton
(
ygo
::
mainGame
->
btnReplayMode
);
if
(
open_file
){
ygo
::
mainGame
->
lstReplayList
->
setSelected
(
index
);
...
...
@@ -132,7 +131,7 @@ int main(int argc, char* argv[]) {
index
=
GetListBoxIndex
(
ygo
::
mainGame
->
lstReplayList
,
fname
);
}
ygo
::
mainGame
->
HideElement
(
ygo
::
mainGame
->
wMainMenu
);
ygo
::
mainGame
->
HideElement
(
ygo
::
mainGame
->
wMainMenu
);
ClickButton
(
ygo
::
mainGame
->
btnSingleMode
);
if
(
open_file
){
ygo
::
mainGame
->
lstSinglePlayList
->
setSelected
(
index
);
...
...
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