Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
YGOMobile-Cn-Ko-En
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-Cn-Ko-En
Commits
deed80f6
Commit
deed80f6
authored
Jan 20, 2020
by
fallenstardust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sync gframe
parent
780173ad
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
82 additions
and
23 deletions
+82
-23
Classes/gframe/client_card.cpp
Classes/gframe/client_card.cpp
+9
-6
Classes/gframe/client_field.cpp
Classes/gframe/client_field.cpp
+2
-0
Classes/gframe/config.h
Classes/gframe/config.h
+1
-0
Classes/gframe/deck_con.cpp
Classes/gframe/deck_con.cpp
+0
-1
Classes/gframe/deck_manager.cpp
Classes/gframe/deck_manager.cpp
+3
-2
Classes/gframe/drawing.cpp
Classes/gframe/drawing.cpp
+7
-1
Classes/gframe/duelclient.cpp
Classes/gframe/duelclient.cpp
+44
-3
Classes/gframe/event_handler.cpp
Classes/gframe/event_handler.cpp
+4
-6
Classes/gframe/replay.cpp
Classes/gframe/replay.cpp
+0
-1
Classes/gframe/single_duel.cpp
Classes/gframe/single_duel.cpp
+2
-1
Classes/gframe/tag_duel.cpp
Classes/gframe/tag_duel.cpp
+2
-1
mobile/assets/data/conf/strings.conf
mobile/assets/data/conf/strings.conf
+8
-1
No files found.
Classes/gframe/client_card.cpp
View file @
deed80f6
...
...
@@ -213,14 +213,17 @@ bool ClientCard::client_card_sort(ClientCard* c1, ClientCard* c2) {
else
return
c1
->
sequence
<
c2
->
sequence
;
else
{
if
(
c1
->
location
&
(
LOCATION_DECK
|
LOCATION_GRAVE
|
LOCATION_REMOVED
|
LOCATION_EXTRA
))
{
for
(
size_t
i
=
0
;
i
<
mainGame
->
dField
.
chains
.
size
();
++
i
)
{
auto
chit
=
mainGame
->
dField
.
chains
[
i
];
if
(
c1
==
chit
.
chain_card
||
chit
.
target
.
find
(
c1
)
!=
chit
.
target
.
end
())
return
true
;
auto
it1
=
std
::
find_if
(
mainGame
->
dField
.
chains
.
rbegin
(),
mainGame
->
dField
.
chains
.
rend
(),
[
c1
](
const
auto
&
ch
)
{
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
auto
&
ch
)
{
return
c2
==
ch
.
chain_card
||
ch
.
target
.
find
(
c2
)
!=
ch
.
target
.
end
();
});
if
(
it1
!=
mainGame
->
dField
.
chains
.
rend
()
||
it2
!=
mainGame
->
dField
.
chains
.
rend
())
{
return
it1
<
it2
;
}
return
c1
->
sequence
>
c2
->
sequence
;
}
else
}
else
return
c1
->
sequence
<
c2
->
sequence
;
}
}
...
...
Classes/gframe/client_field.cpp
View file @
deed80f6
...
...
@@ -18,6 +18,8 @@ ClientField::ClientField() {
hovered_controler
=
0
;
hovered_location
=
0
;
hovered_sequence
=
0
;
selectable_field
=
0
;
selected_field
=
0
;
deck_act
=
false
;
grave_act
=
false
;
remove_act
=
false
;
...
...
Classes/gframe/config.h
View file @
deed80f6
...
...
@@ -92,6 +92,7 @@ inline int _wtoi(const wchar_t * s) {
#include <time.h>
#include <thread>
#include <mutex>
#include <algorithm>
#ifdef _IRR_ANDROID_PLATFORM_
#include <android/bufferio_android.h>
#else
...
...
Classes/gframe/deck_con.cpp
View file @
deed80f6
...
...
@@ -6,7 +6,6 @@
#include "myfilesystem.h"
#include "game.h"
#include "duelclient.h"
#include <algorithm>
namespace
ygo
{
...
...
Classes/gframe/deck_manager.cpp
View file @
deed80f6
...
...
@@ -3,7 +3,6 @@
#include "network.h"
#include "game.h"
#include "myfilesystem.h"
#include <algorithm>
namespace
ygo
{
...
...
@@ -146,7 +145,9 @@ int DeckManager::LoadDeck(Deck& deck, int* dbuf, int mainc, int sidec) {
}
if
(
cd
.
type
&
TYPE_TOKEN
)
continue
;
else
if
(
cd
.
type
&
(
TYPE_FUSION
|
TYPE_SYNCHRO
|
TYPE_XYZ
|
TYPE_LINK
)
&&
deck
.
extra
.
size
()
<
15
)
{
else
if
(
cd
.
type
&
(
TYPE_FUSION
|
TYPE_SYNCHRO
|
TYPE_XYZ
|
TYPE_LINK
))
{
if
(
deck
.
extra
.
size
()
>=
15
)
continue
;
deck
.
extra
.
push_back
(
dataManager
.
GetCodePointer
(
code
));
//verified by GetData()
}
else
if
(
deck
.
main
.
size
()
<
60
)
{
deck
.
main
.
push_back
(
dataManager
.
GetCodePointer
(
code
));
...
...
Classes/gframe/drawing.cpp
View file @
deed80f6
...
...
@@ -156,7 +156,7 @@ void Game::DrawBackGround() {
driver
->
drawVertexPrimitiveList
(
matManager
.
vField
,
4
,
matManager
.
iRectangle
,
2
);
driver
->
setMaterial
(
matManager
.
mBackLine
);
//select field
if
(
dInfo
.
curMsg
==
MSG_SELECT_PLACE
||
dInfo
.
curMsg
==
MSG_SELECT_DISFIELD
)
{
if
(
dInfo
.
curMsg
==
MSG_SELECT_PLACE
||
dInfo
.
curMsg
==
MSG_SELECT_DISFIELD
||
dInfo
.
curMsg
==
MSG_HINT
)
{
float
cv
[
4
]
=
{
0.0
f
,
0.0
f
,
1.0
f
,
1.0
f
};
unsigned
int
filter
=
0x1
;
for
(
int
i
=
0
;
i
<
7
;
++
i
,
filter
<<=
1
)
{
...
...
@@ -1127,10 +1127,16 @@ void Game::HideElement(irr::gui::IGUIElement * win, bool set_action) {
for
(
int
i
=
0
;
i
<
5
;
++
i
)
btnCardSelect
[
i
]
->
setDrawImage
(
false
);
dField
.
conti_selecting
=
false
;
stCardListTip
->
setVisible
(
false
);
for
(
auto
&
pcard
:
dField
.
selectable_cards
)
dField
.
SetShowMark
(
pcard
,
false
);
}
if
(
win
==
wCardDisplay
)
{
for
(
int
i
=
0
;
i
<
5
;
++
i
)
btnCardDisplay
[
i
]
->
setDrawImage
(
false
);
stCardListTip
->
setVisible
(
false
);
for
(
auto
&
pcard
:
dField
.
display_cards
)
dField
.
SetShowMark
(
pcard
,
false
);
}
fadingList
.
push_back
(
fu
);
}
...
...
Classes/gframe/duelclient.cpp
View file @
deed80f6
...
...
@@ -7,7 +7,6 @@
#include "game.h"
#include "replay.h"
#include "replay_mode.h"
#include <algorithm>
#ifdef _IRR_ANDROID_PLATFORM_
#include <android/android_tools.h>
#endif
...
...
@@ -1079,6 +1078,48 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
mainGame
->
WaitFrameSignal
(
30
);
break
;
}
case
HINT_ZONE
:
{
if
(
mainGame
->
LocalPlayer
(
player
)
==
1
)
data
=
(
data
>>
16
)
|
(
data
<<
16
);
for
(
unsigned
filter
=
0x1
;
filter
!=
0
;
filter
<<=
1
)
{
std
::
wstring
str
;
if
(
unsigned
s
=
filter
&
data
)
{
if
(
s
&
0x60
)
{
str
+=
dataManager
.
GetSysString
(
1081
);
data
&=
~
0x600000
;
}
else
if
(
s
&
0xffff
)
str
+=
dataManager
.
GetSysString
(
102
);
else
if
(
s
&
0xffff0000
)
{
str
+=
dataManager
.
GetSysString
(
103
);
s
>>=
16
;
}
if
(
s
&
0x1f
)
str
+=
dataManager
.
GetSysString
(
1002
);
else
if
(
s
&
0xff00
)
{
s
>>=
8
;
if
(
s
&
0x1f
)
str
+=
dataManager
.
GetSysString
(
1003
);
else
if
(
s
&
0x20
)
str
+=
dataManager
.
GetSysString
(
1008
);
else
if
(
s
&
0xc0
)
str
+=
dataManager
.
GetSysString
(
1009
);
}
int
seq
=
1
;
for
(
int
i
=
0x1
;
i
<
0x100
;
i
<<=
1
)
{
if
(
s
&
i
)
break
;
++
seq
;
}
str
+=
L"("
+
std
::
to_wstring
(
seq
)
+
L")"
;
myswprintf
(
textBuffer
,
dataManager
.
GetSysString
(
1510
),
str
.
c_str
());
mainGame
->
AddLog
(
textBuffer
);
}
}
mainGame
->
dField
.
selectable_field
=
data
;
mainGame
->
WaitFrameSignal
(
40
);
mainGame
->
dField
.
selectable_field
=
0
;
break
;
}
}
break
;
}
...
...
@@ -1095,7 +1136,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
else
if
(
mainGame
->
LocalPlayer
(
player
)
==
0
)
{
mainGame
->
showcardcode
=
1
;
if
(
match_kill
)
myswprintf
(
vic_buf
,
dataManager
.
GetVictoryString
(
0x
20
),
dataManager
.
GetName
(
match_kill
));
myswprintf
(
vic_buf
,
dataManager
.
GetVictoryString
(
0x
ffff
),
dataManager
.
GetName
(
match_kill
));
else
if
(
type
<
0x10
)
myswprintf
(
vic_buf
,
L"[%ls] %ls"
,
mainGame
->
dInfo
.
clientname
,
dataManager
.
GetVictoryString
(
type
));
else
...
...
@@ -1104,7 +1145,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
}
else
{
mainGame
->
showcardcode
=
2
;
if
(
match_kill
)
myswprintf
(
vic_buf
,
dataManager
.
GetVictoryString
(
0x
20
),
dataManager
.
GetName
(
match_kill
));
myswprintf
(
vic_buf
,
dataManager
.
GetVictoryString
(
0x
ffff
),
dataManager
.
GetName
(
match_kill
));
else
if
(
type
<
0x10
)
myswprintf
(
vic_buf
,
L"[%ls] %ls"
,
mainGame
->
dInfo
.
hostname
,
dataManager
.
GetVictoryString
(
type
));
else
...
...
Classes/gframe/event_handler.cpp
View file @
deed80f6
...
...
@@ -10,7 +10,6 @@
#include "single_mode.h"
#include "materials.h"
#include "../ocgcore/common.h"
#include <algorithm>
namespace
ygo
{
...
...
@@ -644,7 +643,6 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
case
BUTTON_CARD_4
:
{
if
(
mainGame
->
dInfo
.
isReplay
)
break
;
mainGame
->
stCardListTip
->
setVisible
(
false
);
switch
(
mainGame
->
dInfo
.
curMsg
)
{
case
MSG_SELECT_IDLECMD
:
case
MSG_SELECT_BATTLECMD
:
...
...
@@ -741,7 +739,8 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
if
(
selected_cards
.
size
()
>
0
)
{
SetResponseSelectedCards
();
ShowCancelOrFinishButton
(
0
);
mainGame
->
HideElement
(
mainGame
->
wCardSelect
,
true
);}
mainGame
->
HideElement
(
mainGame
->
wCardSelect
,
true
);
}
break
;
}
case
MSG_SELECT_SUM
:
{
...
...
@@ -790,7 +789,6 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
break
;
}
case
BUTTON_CARD_SEL_OK
:
{
mainGame
->
stCardListTip
->
setVisible
(
false
);
if
(
mainGame
->
dInfo
.
isReplay
)
{
mainGame
->
HideElement
(
mainGame
->
wCardSelect
);
break
;
...
...
@@ -1037,13 +1035,13 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
break
;
}
case
irr
:
:
gui
::
EGET_ELEMENT_LEFT
:
{
if
(
id
>=
BUTTON_CARD_0
&&
id
<=
BUTTON_CARD_4
)
{
if
(
id
>=
BUTTON_CARD_0
&&
id
<=
BUTTON_CARD_4
&&
mainGame
->
stCardListTip
->
isVisible
()
)
{
int
pos
=
mainGame
->
scrCardList
->
getPos
()
/
10
;
ClientCard
*
mcard
=
selectable_cards
[
id
-
BUTTON_CARD_0
+
pos
];
SetShowMark
(
mcard
,
false
);
mainGame
->
stCardListTip
->
setVisible
(
false
);
}
if
(
id
>=
BUTTON_DISPLAY_0
&&
id
<=
BUTTON_DISPLAY_4
)
{
if
(
id
>=
BUTTON_DISPLAY_0
&&
id
<=
BUTTON_DISPLAY_4
&&
mainGame
->
stCardListTip
->
isVisible
()
)
{
int
pos
=
mainGame
->
scrDisplayList
->
getPos
()
/
10
;
ClientCard
*
mcard
=
display_cards
[
id
-
BUTTON_DISPLAY_0
+
pos
];
SetShowMark
(
mcard
,
false
);
...
...
Classes/gframe/replay.cpp
View file @
deed80f6
#include "replay.h"
#include "../ocgcore/ocgapi.h"
#include "../ocgcore/common.h"
#include <algorithm>
#include "lzma/LzmaLib.h"
#include "myfilesystem.h"
...
...
Classes/gframe/single_duel.cpp
View file @
deed80f6
...
...
@@ -589,7 +589,8 @@ int SingleDuel::Analyze(char* msgbuffer, unsigned int len) {
case
6
:
case
7
:
case
8
:
case
9
:
{
case
9
:
case
11
:
{
NetServer
::
SendBufferToPlayer
(
players
[
1
-
player
],
STOC_GAME_MSG
,
offset
,
pbuf
-
offset
);
for
(
auto
oit
=
observers
.
begin
();
oit
!=
observers
.
end
();
++
oit
)
NetServer
::
ReSendToPlayer
(
*
oit
);
...
...
Classes/gframe/tag_duel.cpp
View file @
deed80f6
...
...
@@ -536,7 +536,8 @@ int TagDuel::Analyze(char* msgbuffer, unsigned int len) {
case
6
:
case
7
:
case
8
:
case
9
:
{
case
9
:
case
11
:
{
for
(
int
i
=
0
;
i
<
4
;
++
i
)
if
(
players
[
i
]
!=
cur_player
[
player
])
NetServer
::
SendBufferToPlayer
(
players
[
i
],
STOC_GAME_MSG
,
offset
,
pbuf
-
offset
);
...
...
mobile/assets/data/conf/strings.conf
View file @
deed80f6
...
...
@@ -53,6 +53,8 @@
!
system
98
是否要解放对方怪兽?
!
system
100
先攻
!
system
101
后攻
!
system
102
我方
!
system
103
对方
!
system
200
是否在[%
ls
]发动[%
ls
]的效果?
!
system
201
此时没有可以发动的效果
!
system
202
是否要确认场上的情况?
...
...
@@ -204,6 +206,7 @@
!
system
1075
特殊召唤
!
system
1076
连接
!
system
1080
(
N
/
A
)
!
system
1081
额外怪兽区
#GUI
!
system
1100
魔陷破坏
!
system
1101
怪兽破坏
...
...
@@ -524,7 +527,8 @@
!
victory
0
x1d
「方程式运动员胜利团队」效果胜利
!
victory
0
x1e
「飞行象」效果胜利
!
victory
0
x1f
「守护神 艾克佐迪亚」效果胜利
!
victory
0
x20
由于「%
ls
」的效果获得比赛胜利
!
victory
0
x20
「真艾克佐迪亚」效果胜利
!
victory
0
xffff
由于「%
ls
」的效果获得比赛胜利
#counters
!
counter
0
x1
魔力指示物
!
counter
0
x1002
楔指示物
...
...
@@ -1009,3 +1013,6 @@
!
setname
0
x139
守护神官 守護神官
!
setname
0
x13a
拟声 オノマト
!
setname
0
x13b
叛逆 リベリオン
!
setname
0
x13c
代码破坏者 コードブレイカー
!
setname
0
x13d
星义 ネメシス
!
setname
0
x13e
巴巴罗斯 バルバロス
\ 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