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
655b919d
Commit
655b919d
authored
Dec 30, 2023
by
Dark Zane
Committed by
GitHub
Dec 30, 2023
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'fallenstardust:master' into master
parents
c103703a
fea1f4d0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
15 deletions
+16
-15
Classes/gframe/client_card.cpp
Classes/gframe/client_card.cpp
+9
-6
libcore/jni/Android.mk
libcore/jni/Android.mk
+1
-1
mobile/src/main/java/cn/garymb/ygomobile/loader/DeckLoader.java
.../src/main/java/cn/garymb/ygomobile/loader/DeckLoader.java
+6
-8
No files found.
Classes/gframe/client_card.cpp
View file @
655b919d
...
@@ -220,23 +220,26 @@ bool ClientCard::client_card_sort(ClientCard* c1, ClientCard* c2) {
...
@@ -220,23 +220,26 @@ bool ClientCard::client_card_sort(ClientCard* c1, ClientCard* c2) {
return
cp1
<
cp2
;
return
cp1
<
cp2
;
if
(
c1
->
location
!=
c2
->
location
)
if
(
c1
->
location
!=
c2
->
location
)
return
c1
->
location
<
c2
->
location
;
return
c1
->
location
<
c2
->
location
;
if
(
c1
->
location
&
LOCATION_OVERLAY
)
if
(
c1
->
location
&
LOCATION_OVERLAY
)
{
if
(
c1
->
overlayTarget
!=
c2
->
overlayTarget
)
if
(
c1
->
overlayTarget
!=
c2
->
overlayTarget
)
return
c1
->
overlayTarget
->
sequence
<
c2
->
overlayTarget
->
sequence
;
return
c1
->
overlayTarget
->
sequence
<
c2
->
overlayTarget
->
sequence
;
else
return
c1
->
sequence
<
c2
->
sequence
;
else
return
c1
->
sequence
<
c2
->
sequence
;
}
else
{
else
{
if
(
c1
->
location
&
(
LOCATION_DECK
|
LOCATION_GRAVE
|
LOCATION_REMOVED
|
LOCATION_EXTRA
))
{
if
(
c1
->
location
&
(
LOCATION_DECK
|
LOCATION_GRAVE
|
LOCATION_REMOVED
|
LOCATION_EXTRA
))
{
auto
it1
=
std
::
find_if
(
mainGame
->
dField
.
chains
.
rbegin
(),
mainGame
->
dField
.
chains
.
rend
(),
[
c1
](
const
aut
o
&
ch
)
{
auto
it1
=
std
::
find_if
(
mainGame
->
dField
.
chains
.
rbegin
(),
mainGame
->
dField
.
chains
.
rend
(),
[
c1
](
const
ChainInf
o
&
ch
)
{
return
c1
==
ch
.
chain_card
||
ch
.
target
.
find
(
c1
)
!=
ch
.
target
.
end
();
return
c1
==
ch
.
chain_card
||
ch
.
target
.
find
(
c1
)
!=
ch
.
target
.
end
();
});
});
auto
it2
=
std
::
find_if
(
mainGame
->
dField
.
chains
.
rbegin
(),
mainGame
->
dField
.
chains
.
rend
(),
[
c2
](
const
aut
o
&
ch
)
{
auto
it2
=
std
::
find_if
(
mainGame
->
dField
.
chains
.
rbegin
(),
mainGame
->
dField
.
chains
.
rend
(),
[
c2
](
const
ChainInf
o
&
ch
)
{
return
c2
==
ch
.
chain_card
||
ch
.
target
.
find
(
c2
)
!=
ch
.
target
.
end
();
return
c2
==
ch
.
chain_card
||
ch
.
target
.
find
(
c2
)
!=
ch
.
target
.
end
();
});
});
if
(
it1
!=
mainGame
->
dField
.
chains
.
rend
()
||
it2
!=
mainGame
->
dField
.
chains
.
rend
())
{
if
(
it1
!=
mainGame
->
dField
.
chains
.
rend
()
||
it2
!=
mainGame
->
dField
.
chains
.
rend
())
{
return
it1
<
it2
;
return
it1
<
it2
;
}
}
return
c1
->
sequence
>
c2
->
sequence
;
return
c1
->
sequence
>
c2
->
sequence
;
}
else
}
else
return
c1
->
sequence
<
c2
->
sequence
;
return
c1
->
sequence
<
c2
->
sequence
;
}
}
}
}
...
...
libcore/jni/Android.mk
View file @
655b919d
...
@@ -13,7 +13,7 @@ LOCAL_MODULE := YGOMobile
...
@@ -13,7 +13,7 @@ LOCAL_MODULE := YGOMobile
LOCAL_CFLAGS
:=
-D_IRR_ANDROID_PLATFORM_
-pipe
-fno-rtti
-fno-exceptions
-fstrict-aliasing
-D_ANDROID
-fPIC
LOCAL_CFLAGS
:=
-D_IRR_ANDROID_PLATFORM_
-pipe
-fno-rtti
-fno-exceptions
-fstrict-aliasing
-D_ANDROID
-fPIC
TARGET_FORMAT_STRING_CFLAGS
:=
TARGET_FORMAT_STRING_CFLAGS
:=
LOCAL_CPPFLAGS
:=
-std
=
c++1
4
LOCAL_CPPFLAGS
:=
-std
=
c++1
1
ifndef
NDEBUG
ifndef
NDEBUG
LOCAL_CFLAGS
+=
-g
-D_DEBUG
LOCAL_CFLAGS
+=
-g
-D_DEBUG
...
...
mobile/src/main/java/cn/garymb/ygomobile/loader/DeckLoader.java
View file @
655b919d
package
cn.garymb.ygomobile.loader
;
package
cn.garymb.ygomobile.loader
;
import
static
cn
.
garymb
.
ygomobile
.
Constants
.
newIDsArray
;
import
static
cn
.
garymb
.
ygomobile
.
Constants
.
oldIDsArray
;
import
static
cn
.
garymb
.
ygomobile
.
ui
.
home
.
HomeActivity
.
pre_code_list
;
import
static
cn
.
garymb
.
ygomobile
.
ui
.
home
.
HomeActivity
.
pre_code_list
;
import
static
cn
.
garymb
.
ygomobile
.
ui
.
home
.
HomeActivity
.
released_code_list
;
import
static
cn
.
garymb
.
ygomobile
.
ui
.
home
.
HomeActivity
.
released_code_list
;
import
static
cn
.
garymb
.
ygomobile
.
utils
.
ComparisonTableUtil
.
newIDsArray
;
import
static
cn
.
garymb
.
ygomobile
.
utils
.
ComparisonTableUtil
.
oldIDsArray
;
import
android.os.Build
;
import
android.text.TextUtils
;
import
android.text.TextUtils
;
import
android.util.Log
;
import
android.util.Log
;
import
android.util.SparseArray
;
import
android.util.SparseArray
;
...
@@ -23,7 +22,6 @@ import cn.garymb.ygomobile.bean.Deck;
...
@@ -23,7 +22,6 @@ import cn.garymb.ygomobile.bean.Deck;
import
cn.garymb.ygomobile.bean.DeckInfo
;
import
cn.garymb.ygomobile.bean.DeckInfo
;
import
cn.garymb.ygomobile.ui.cards.deck.DeckItemType
;
import
cn.garymb.ygomobile.ui.cards.deck.DeckItemType
;
import
cn.garymb.ygomobile.ui.cards.deck.DeckUtils
;
import
cn.garymb.ygomobile.ui.cards.deck.DeckUtils
;
import
cn.garymb.ygomobile.ui.home.HomeActivity
;
import
cn.garymb.ygomobile.utils.IOUtils
;
import
cn.garymb.ygomobile.utils.IOUtils
;
import
cn.hutool.core.util.ArrayUtil
;
import
cn.hutool.core.util.ArrayUtil
;
import
ocgcore.data.Card
;
import
ocgcore.data.Card
;
...
@@ -152,9 +150,9 @@ public class DeckLoader {
...
@@ -152,9 +150,9 @@ public class DeckLoader {
for
(
Integer
id
:
deck
.
getExtraList
())
{
for
(
Integer
id
:
deck
.
getExtraList
())
{
if
(
released_code_list
.
contains
(
tmp
.
get
(
id
).
getCode
()))
{
if
(
released_code_list
.
contains
(
tmp
.
get
(
id
).
getCode
()))
{
code
=
pre_code_list
.
get
(
released_code_list
.
indexOf
(
tmp
.
get
(
id
).
getCode
()));
code
=
pre_code_list
.
get
(
released_code_list
.
indexOf
(
tmp
.
get
(
id
).
getCode
()));
if
(
cardLoader
.
readAllCardCodes
().
get
(
code
)
!=
null
)
{
if
(
cardLoader
.
readAllCardCodes
().
get
(
code
)
!=
null
)
{
tmp
.
set
(
id
,
cardLoader
.
readAllCardCodes
().
get
(
code
));
tmp
.
set
(
id
,
cardLoader
.
readAllCardCodes
().
get
(
code
));
}
}
}
}
if
(
ArrayUtil
.
contains
(
oldIDsArray
,
tmp
.
get
(
id
).
getCode
()))
{
if
(
ArrayUtil
.
contains
(
oldIDsArray
,
tmp
.
get
(
id
).
getCode
()))
{
code
=
ArrayUtil
.
get
(
newIDsArray
,
ArrayUtil
.
indexOf
(
oldIDsArray
,
tmp
.
get
(
id
).
getCode
()));
code
=
ArrayUtil
.
get
(
newIDsArray
,
ArrayUtil
.
indexOf
(
oldIDsArray
,
tmp
.
get
(
id
).
getCode
()));
...
@@ -179,7 +177,7 @@ public class DeckLoader {
...
@@ -179,7 +177,7 @@ public class DeckLoader {
}
}
deckInfo
.
addSideCards
(
tmp
.
get
(
id
));
deckInfo
.
addSideCards
(
tmp
.
get
(
id
));
}
}
Log
.
w
(
"deck.source"
,
deckInfo
.
toLongString
());
Log
.
w
(
"deck.source"
,
deckInfo
.
toLongString
());
return
deckInfo
;
return
deckInfo
;
}
}
}
}
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