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
74be9404
Commit
74be9404
authored
Jun 03, 2018
by
fallenstardust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加卡差,数字计时,默认屏蔽虚拟键
parent
b43e94c2
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
106 additions
and
4 deletions
+106
-4
Classes/gframe/client_field.cpp
Classes/gframe/client_field.cpp
+27
-0
Classes/gframe/client_field.h
Classes/gframe/client_field.h
+2
-0
Classes/gframe/drawing.cpp
Classes/gframe/drawing.cpp
+29
-0
Classes/gframe/duelclient.cpp
Classes/gframe/duelclient.cpp
+3
-0
Classes/gframe/game.cpp
Classes/gframe/game.cpp
+20
-1
Classes/gframe/game.h
Classes/gframe/game.h
+7
-0
Classes/gframe/image_manager.cpp
Classes/gframe/image_manager.cpp
+1
-0
Classes/gframe/image_manager.h
Classes/gframe/image_manager.h
+1
-0
mobile/assets/changelog.html
mobile/assets/changelog.html
+14
-1
mobile/assets/data/textures/clock.png
mobile/assets/data/textures/clock.png
+0
-0
mobile/build.gradle
mobile/build.gradle
+1
-1
mobile/src/main/java/cn/garymb/ygomobile/Constants.java
mobile/src/main/java/cn/garymb/ygomobile/Constants.java
+1
-1
No files found.
Classes/gframe/client_field.cpp
View file @
74be9404
...
@@ -91,6 +91,7 @@ void ClientField::Clear() {
...
@@ -91,6 +91,7 @@ void ClientField::Clear() {
pzone_act
[
1
]
=
false
;
pzone_act
[
1
]
=
false
;
conti_act
=
false
;
conti_act
=
false
;
deck_reversed
=
false
;
deck_reversed
=
false
;
RefreshCardCountDisplay
();
}
}
void
ClientField
::
Initial
(
int
player
,
int
deckc
,
int
extrac
)
{
void
ClientField
::
Initial
(
int
player
,
int
deckc
,
int
extrac
)
{
ClientCard
*
pcard
;
ClientCard
*
pcard
;
...
@@ -114,6 +115,7 @@ void ClientField::Initial(int player, int deckc, int extrac) {
...
@@ -114,6 +115,7 @@ void ClientField::Initial(int player, int deckc, int extrac) {
pcard
->
position
=
POS_FACEDOWN_DEFENSE
;
pcard
->
position
=
POS_FACEDOWN_DEFENSE
;
GetCardLocation
(
pcard
,
&
pcard
->
curPos
,
&
pcard
->
curRot
,
true
);
GetCardLocation
(
pcard
,
&
pcard
->
curPos
,
&
pcard
->
curRot
,
true
);
}
}
RefreshCardCountDisplay
();
}
}
ClientCard
*
ClientField
::
GetCard
(
int
controler
,
int
location
,
int
sequence
,
int
sub_seq
)
{
ClientCard
*
ClientField
::
GetCard
(
int
controler
,
int
location
,
int
sequence
,
int
sub_seq
)
{
std
::
vector
<
ClientCard
*>*
lst
=
0
;
std
::
vector
<
ClientCard
*>*
lst
=
0
;
...
@@ -223,6 +225,7 @@ void ClientField::AddCard(ClientCard* pcard, int controler, int location, int se
...
@@ -223,6 +225,7 @@ void ClientField::AddCard(ClientCard* pcard, int controler, int location, int se
break
;
break
;
}
}
}
}
RefreshCardCountDisplay
();
}
}
ClientCard
*
ClientField
::
RemoveCard
(
int
controler
,
int
location
,
int
sequence
)
{
ClientCard
*
ClientField
::
RemoveCard
(
int
controler
,
int
location
,
int
sequence
)
{
ClientCard
*
pcard
=
0
;
ClientCard
*
pcard
=
0
;
...
@@ -1432,4 +1435,28 @@ void ClientField::UpdateDeclarableCode(bool enter) {
...
@@ -1432,4 +1435,28 @@ void ClientField::UpdateDeclarableCode(bool enter) {
else
else
UpdateDeclarableCodeOpcode
(
enter
);
UpdateDeclarableCodeOpcode
(
enter
);
}
}
void
ClientField
::
RefreshCardCountDisplay
()
{
for
(
int
p
=
0
;
p
<
2
;
++
p
)
{
mainGame
->
dInfo
.
card_count
[
p
]
=
hand
[
p
].
size
();
for
(
auto
it
=
mzone
[
p
].
begin
();
it
!=
mzone
[
p
].
end
();
++
it
)
{
if
(
*
it
)
mainGame
->
dInfo
.
card_count
[
p
]
++
;
}
for
(
auto
it
=
szone
[
p
].
begin
();
it
!=
szone
[
p
].
end
();
++
it
)
{
if
(
*
it
)
mainGame
->
dInfo
.
card_count
[
p
]
++
;
}
myswprintf
(
mainGame
->
dInfo
.
str_card_count
[
p
],
L"%d"
,
mainGame
->
dInfo
.
card_count
[
p
]);
}
if
(
mainGame
->
dInfo
.
card_count
[
0
]
>
mainGame
->
dInfo
.
card_count
[
1
])
{
mainGame
->
dInfo
.
card_count_color
[
0
]
=
0xffffff00
;
mainGame
->
dInfo
.
card_count_color
[
1
]
=
0xffff0000
;
}
else
if
(
mainGame
->
dInfo
.
card_count
[
1
]
>
mainGame
->
dInfo
.
card_count
[
0
])
{
mainGame
->
dInfo
.
card_count_color
[
1
]
=
0xffffff00
;
mainGame
->
dInfo
.
card_count_color
[
0
]
=
0xffff0000
;
}
else
{
mainGame
->
dInfo
.
card_count_color
[
0
]
=
0xffffffff
;
mainGame
->
dInfo
.
card_count_color
[
1
]
=
0xffffffff
;
}
}
}
}
\ No newline at end of file
Classes/gframe/client_field.h
View file @
74be9404
...
@@ -117,6 +117,8 @@ public:
...
@@ -117,6 +117,8 @@ public:
void
UpdateDeclarableCodeOpcode
(
bool
enter
);
void
UpdateDeclarableCodeOpcode
(
bool
enter
);
void
UpdateDeclarableCode
(
bool
enter
);
void
UpdateDeclarableCode
(
bool
enter
);
void
RefreshCardCountDisplay
();
irr
::
gui
::
IGUIElement
*
panel
;
irr
::
gui
::
IGUIElement
*
panel
;
std
::
vector
<
int
>
ancard
;
std
::
vector
<
int
>
ancard
;
int
hovered_controler
;
int
hovered_controler
;
...
...
Classes/gframe/drawing.cpp
View file @
74be9404
...
@@ -432,6 +432,13 @@ void Game::DrawCard(ClientCard* pcard) {
...
@@ -432,6 +432,13 @@ void Game::DrawCard(ClientCard* pcard) {
}
//pendulum RIGHT scale image
}
//pendulum RIGHT scale image
}
}
}
}
void
Game
::
DrawShadowText
(
CGUITTFont
*
font
,
const
core
::
stringw
&
text
,
const
core
::
rect
<
s32
>&
position
,
const
core
::
rect
<
s32
>&
padding
,
video
::
SColor
color
,
video
::
SColor
shadowcolor
,
bool
hcenter
,
bool
vcenter
,
const
core
::
rect
<
s32
>*
clip
)
{
core
::
rect
<
s32
>
shadowposition
=
recti
(
position
.
UpperLeftCorner
.
X
-
padding
.
UpperLeftCorner
.
X
,
position
.
UpperLeftCorner
.
Y
-
padding
.
UpperLeftCorner
.
Y
,
position
.
LowerRightCorner
.
X
-
padding
.
LowerRightCorner
.
X
,
position
.
LowerRightCorner
.
Y
-
padding
.
LowerRightCorner
.
Y
);
font
->
draw
(
text
,
shadowposition
,
shadowcolor
,
hcenter
,
vcenter
,
clip
);
font
->
draw
(
text
,
position
,
color
,
hcenter
,
vcenter
,
clip
);
}
void
Game
::
DrawMisc
()
{
void
Game
::
DrawMisc
()
{
static
irr
::
core
::
vector3df
act_rot
(
0
,
0
,
0
);
static
irr
::
core
::
vector3df
act_rot
(
0
,
0
,
0
);
int
rule
=
(
dInfo
.
duel_rule
>=
4
)
?
1
:
0
;
int
rule
=
(
dInfo
.
duel_rule
>=
4
)
?
1
:
0
;
...
@@ -542,10 +549,32 @@ void Game::DrawMisc() {
...
@@ -542,10 +549,32 @@ void Game::DrawMisc() {
}
}
}
}
if
(
!
dInfo
.
isReplay
&&
dInfo
.
player_type
<
7
&&
dInfo
.
time_limit
)
{
if
(
!
dInfo
.
isReplay
&&
dInfo
.
player_type
<
7
&&
dInfo
.
time_limit
)
{
if
(
imageManager
.
tClock
)
{
driver
->
draw2DImage
(
imageManager
.
tClock
,
recti
(
577
*
mainGame
->
xScale
,
32
*
mainGame
->
yScale
,
595
*
mainGame
->
xScale
,
50
*
mainGame
->
yScale
),
recti
(
0
,
0
,
128
,
128
),
0
,
0
,
true
);
driver
->
draw2DImage
(
imageManager
.
tClock
,
recti
(
695
*
mainGame
->
xScale
,
32
*
mainGame
->
yScale
,
713
*
mainGame
->
xScale
,
50
*
mainGame
->
yScale
),
recti
(
0
,
0
,
128
,
128
),
0
,
0
,
true
);
}
DrawShadowText
(
numFont
,
dInfo
.
str_time_left
[
0
],
recti
(
595
*
mainGame
->
xScale
,
31
*
mainGame
->
yScale
,
625
*
mainGame
->
xScale
,
50
*
mainGame
->
yScale
),
recti
(
0
,
1
*
mainGame
->
yScale
,
2
*
mainGame
->
xScale
,
0
),
dInfo
.
time_color
[
0
],
0xff000000
,
true
,
false
,
0
);
DrawShadowText
(
numFont
,
dInfo
.
str_time_left
[
1
],
recti
(
713
*
mainGame
->
xScale
,
31
*
mainGame
->
yScale
,
743
*
mainGame
->
xScale
,
50
*
mainGame
->
yScale
),
recti
(
0
,
1
*
mainGame
->
yScale
,
2
*
mainGame
->
xScale
,
0
),
dInfo
.
time_color
[
1
],
0xff000000
,
true
,
false
,
0
);
driver
->
draw2DImage
(
imageManager
.
tCover
[
0
],
recti
(
535
*
mainGame
->
xScale
,
32
*
mainGame
->
yScale
,
545
*
mainGame
->
xScale
,
50
*
mainGame
->
yScale
),
rect
<
s32
>
(
0
,
0
,
CARD_IMG_WIDTH
,
CARD_IMG_HEIGHT
),
0
,
0
,
true
);
driver
->
draw2DImage
(
imageManager
.
tCover
[
1
],
recti
(
745
*
mainGame
->
xScale
,
32
*
mainGame
->
yScale
,
757
*
mainGame
->
xScale
,
50
*
mainGame
->
yScale
),
rect
<
s32
>
(
0
,
0
,
CARD_IMG_WIDTH
,
CARD_IMG_HEIGHT
),
0
,
0
,
true
);
DrawShadowText
(
numFont
,
dInfo
.
str_card_count
[
0
],
recti
(
550
*
mainGame
->
xScale
,
31
*
mainGame
->
yScale
,
575
*
mainGame
->
xScale
,
50
*
mainGame
->
yScale
),
recti
(
0
,
1
*
mainGame
->
yScale
,
2
*
mainGame
->
xScale
,
0
),
dInfo
.
card_count_color
[
0
],
0xff000000
,
true
,
false
,
0
);
DrawShadowText
(
numFont
,
dInfo
.
str_card_count
[
1
],
recti
(
757
*
mainGame
->
xScale
,
31
*
mainGame
->
yScale
,
782
*
mainGame
->
xScale
,
50
*
mainGame
->
yScale
),
recti
(
0
,
1
*
mainGame
->
yScale
,
2
*
mainGame
->
xScale
,
0
),
dInfo
.
card_count_color
[
1
],
0xff000000
,
true
,
false
,
0
);
/*
driver->draw2DRectangle(recti(525 * mainGame->xScale, 34 * mainGame->yScale, (525 + dInfo.time_left[0] * 100 / dInfo.time_limit) * mainGame->xScale, 44 * mainGame->yScale), 0xa0e0e0e0, 0xa0e0e0e0, 0xa0c0c0c0, 0xa0c0c0c0);
driver->draw2DRectangle(recti(525 * mainGame->xScale, 34 * mainGame->yScale, (525 + dInfo.time_left[0] * 100 / dInfo.time_limit) * mainGame->xScale, 44 * mainGame->yScale), 0xa0e0e0e0, 0xa0e0e0e0, 0xa0c0c0c0, 0xa0c0c0c0);
driver->draw2DRectangleOutline(recti(525 * mainGame->xScale, 34 * mainGame->yScale, 625 * mainGame->xScale, 44 * mainGame->yScale), 0xffffffff);
driver->draw2DRectangleOutline(recti(525 * mainGame->xScale, 34 * mainGame->yScale, 625 * mainGame->xScale, 44 * mainGame->yScale), 0xffffffff);
driver->draw2DRectangle(recti((795 - dInfo.time_left[1] * 100 / dInfo.time_limit) * mainGame->xScale, 34 * mainGame->yScale, 795 * mainGame->xScale, 44 * mainGame->yScale), 0xa0e0e0e0, 0xa0e0e0e0, 0xa0c0c0c0, 0xa0c0c0c0);
driver->draw2DRectangle(recti((795 - dInfo.time_left[1] * 100 / dInfo.time_limit) * mainGame->xScale, 34 * mainGame->yScale, 795 * mainGame->xScale, 44 * mainGame->yScale), 0xa0e0e0e0, 0xa0e0e0e0, 0xa0c0c0c0, 0xa0c0c0c0);
driver->draw2DRectangleOutline(recti(695 * mainGame->xScale, 34 * mainGame->yScale, 795 * mainGame->xScale, 44 * mainGame->yScale), 0xffffffff);
driver->draw2DRectangleOutline(recti(695 * mainGame->xScale, 34 * mainGame->yScale, 795 * mainGame->xScale, 44 * mainGame->yScale), 0xffffffff);
*/
}
else
{
driver
->
draw2DImage
(
imageManager
.
tCover
[
0
],
recti
(
588
*
mainGame
->
xScale
,
32
*
mainGame
->
yScale
,
600
*
mainGame
->
xScale
,
50
*
mainGame
->
yScale
),
rect
<
s32
>
(
0
,
0
,
CARD_IMG_WIDTH
,
CARD_IMG_HEIGHT
),
0
,
0
,
true
);
driver
->
draw2DImage
(
imageManager
.
tCover
[
1
],
recti
(
695
*
mainGame
->
xScale
,
32
*
mainGame
->
yScale
,
707
*
mainGame
->
xScale
,
50
*
mainGame
->
yScale
),
rect
<
s32
>
(
0
,
0
,
CARD_IMG_WIDTH
,
CARD_IMG_HEIGHT
),
0
,
0
,
true
);
DrawShadowText
(
numFont
,
dInfo
.
str_card_count
[
0
],
recti
(
600
*
mainGame
->
xScale
,
31
*
mainGame
->
yScale
,
625
*
mainGame
->
xScale
,
50
*
mainGame
->
yScale
),
recti
(
0
,
1
*
mainGame
->
yScale
,
2
*
mainGame
->
xScale
,
0
),
dInfo
.
card_count_color
[
0
],
0xff000000
,
true
,
false
,
0
);
DrawShadowText
(
numFont
,
dInfo
.
str_card_count
[
1
],
recti
(
707
*
mainGame
->
xScale
,
31
*
mainGame
->
yScale
,
732
*
mainGame
->
xScale
,
50
*
mainGame
->
yScale
),
recti
(
0
,
1
*
mainGame
->
yScale
,
2
*
mainGame
->
xScale
,
0
),
dInfo
.
card_count_color
[
1
],
0xff000000
,
true
,
false
,
0
);
}
}
numFont
->
draw
(
dInfo
.
strLP
[
0
],
recti
(
330
*
mainGame
->
xScale
,
11
*
mainGame
->
yScale
,
629
*
mainGame
->
xScale
,
30
*
mainGame
->
yScale
),
0xff000000
,
true
,
false
,
0
);
numFont
->
draw
(
dInfo
.
strLP
[
0
],
recti
(
330
*
mainGame
->
xScale
,
11
*
mainGame
->
yScale
,
629
*
mainGame
->
xScale
,
30
*
mainGame
->
yScale
),
0xff000000
,
true
,
false
,
0
);
numFont
->
draw
(
dInfo
.
strLP
[
0
],
recti
(
330
*
mainGame
->
xScale
,
12
*
mainGame
->
yScale
,
631
*
mainGame
->
xScale
,
30
*
mainGame
->
yScale
),
0xffffff00
,
true
,
false
,
0
);
numFont
->
draw
(
dInfo
.
strLP
[
0
],
recti
(
330
*
mainGame
->
xScale
,
12
*
mainGame
->
yScale
,
631
*
mainGame
->
xScale
,
30
*
mainGame
->
yScale
),
0xffffff00
,
true
,
false
,
0
);
...
...
Classes/gframe/duelclient.cpp
View file @
74be9404
...
@@ -453,6 +453,7 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) {
...
@@ -453,6 +453,7 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) {
mainGame
->
dInfo
.
time_limit
=
pkt
->
info
.
time_limit
;
mainGame
->
dInfo
.
time_limit
=
pkt
->
info
.
time_limit
;
mainGame
->
dInfo
.
time_left
[
0
]
=
0
;
mainGame
->
dInfo
.
time_left
[
0
]
=
0
;
mainGame
->
dInfo
.
time_left
[
1
]
=
0
;
mainGame
->
dInfo
.
time_left
[
1
]
=
0
;
mainGame
->
RefreshTimeDisplay
();
mainGame
->
deckBuilder
.
filterList
=
0
;
mainGame
->
deckBuilder
.
filterList
=
0
;
for
(
auto
lit
=
deckManager
.
_lfList
.
begin
();
lit
!=
deckManager
.
_lfList
.
end
();
++
lit
)
for
(
auto
lit
=
deckManager
.
_lfList
.
begin
();
lit
!=
deckManager
.
_lfList
.
end
();
++
lit
)
if
(
lit
->
hash
==
pkt
->
info
.
lflist
)
if
(
lit
->
hash
==
pkt
->
info
.
lflist
)
...
@@ -570,6 +571,7 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) {
...
@@ -570,6 +571,7 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) {
mainGame
->
dInfo
.
turn
=
0
;
mainGame
->
dInfo
.
turn
=
0
;
mainGame
->
dInfo
.
time_left
[
0
]
=
0
;
mainGame
->
dInfo
.
time_left
[
0
]
=
0
;
mainGame
->
dInfo
.
time_left
[
1
]
=
0
;
mainGame
->
dInfo
.
time_left
[
1
]
=
0
;
mainGame
->
RefreshTimeDisplay
();
mainGame
->
dInfo
.
time_player
=
2
;
mainGame
->
dInfo
.
time_player
=
2
;
mainGame
->
dInfo
.
isReplaySwapped
=
false
;
mainGame
->
dInfo
.
isReplaySwapped
=
false
;
mainGame
->
is_building
=
false
;
mainGame
->
is_building
=
false
;
...
@@ -710,6 +712,7 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) {
...
@@ -710,6 +712,7 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) {
DuelClient
::
SendPacketToServer
(
CTOS_TIME_CONFIRM
);
DuelClient
::
SendPacketToServer
(
CTOS_TIME_CONFIRM
);
mainGame
->
dInfo
.
time_player
=
lplayer
;
mainGame
->
dInfo
.
time_player
=
lplayer
;
mainGame
->
dInfo
.
time_left
[
lplayer
]
=
pkt
->
left_time
;
mainGame
->
dInfo
.
time_left
[
lplayer
]
=
pkt
->
left_time
;
mainGame
->
RefreshTimeDisplay
();
break
;
break
;
}
}
case
STOC_CHAT
:
{
case
STOC_CHAT
:
{
...
...
Classes/gframe/game.cpp
View file @
74be9404
...
@@ -1367,8 +1367,10 @@ void Game::MainLoop() {
...
@@ -1367,8 +1367,10 @@ void Game::MainLoop() {
cur_time
-=
1000
;
cur_time
-=
1000
;
timer
->
setTime
(
0
);
timer
->
setTime
(
0
);
if
(
dInfo
.
time_player
==
0
||
dInfo
.
time_player
==
1
)
if
(
dInfo
.
time_player
==
0
||
dInfo
.
time_player
==
1
)
if
(
dInfo
.
time_left
[
dInfo
.
time_player
])
if
(
dInfo
.
time_left
[
dInfo
.
time_player
])
{
dInfo
.
time_left
[
dInfo
.
time_player
]
--
;
dInfo
.
time_left
[
dInfo
.
time_player
]
--
;
RefreshTimeDisplay
();
}
}
}
#ifdef _IRR_ANDROID_PLATFORM_
#ifdef _IRR_ANDROID_PLATFORM_
device
->
yield
();
// probably nicer to the battery
device
->
yield
();
// probably nicer to the battery
...
@@ -1387,6 +1389,23 @@ void Game::MainLoop() {
...
@@ -1387,6 +1389,23 @@ void Game::MainLoop() {
usleep
(
500000
);
usleep
(
500000
);
// device->drop();
// device->drop();
}
}
void
Game
::
RefreshTimeDisplay
()
{
for
(
int
i
=
0
;
i
<
2
;
++
i
)
{
if
(
dInfo
.
time_left
[
i
]
&&
dInfo
.
time_limit
)
{
if
(
dInfo
.
time_left
[
i
]
>=
dInfo
.
time_limit
/
2
)
dInfo
.
time_color
[
i
]
=
0xffffffff
;
else
if
(
dInfo
.
time_left
[
i
]
>=
dInfo
.
time_limit
/
3
)
dInfo
.
time_color
[
i
]
=
0xffffff00
;
else
if
(
dInfo
.
time_left
[
i
]
>=
dInfo
.
time_limit
/
6
)
dInfo
.
time_color
[
i
]
=
0xffff7f00
;
else
dInfo
.
time_color
[
i
]
=
0xffff0000
;
}
else
dInfo
.
time_color
[
i
]
=
0xffffffff
;
}
myswprintf
(
dInfo
.
str_time_left
[
0
],
L"%d"
,
dInfo
.
time_left
[
0
]);
myswprintf
(
dInfo
.
str_time_left
[
1
],
L"%d"
,
dInfo
.
time_left
[
1
]);
}
void
Game
::
BuildProjectionMatrix
(
irr
::
core
::
matrix4
&
mProjection
,
f32
left
,
f32
right
,
f32
bottom
,
f32
top
,
f32
znear
,
f32
zfar
)
{
void
Game
::
BuildProjectionMatrix
(
irr
::
core
::
matrix4
&
mProjection
,
f32
left
,
f32
right
,
f32
bottom
,
f32
top
,
f32
znear
,
f32
zfar
)
{
for
(
int
i
=
0
;
i
<
16
;
++
i
)
for
(
int
i
=
0
;
i
<
16
;
++
i
)
mProjection
[
i
]
=
0
;
mProjection
[
i
]
=
0
;
...
...
Classes/gframe/game.h
View file @
74be9404
...
@@ -57,6 +57,7 @@ struct DuelInfo {
...
@@ -57,6 +57,7 @@ struct DuelInfo {
bool
is_shuffling
;
bool
is_shuffling
;
bool
tag_player
[
2
];
bool
tag_player
[
2
];
int
lp
[
2
];
int
lp
[
2
];
int
card_count
[
2
];
int
duel_rule
;
int
duel_rule
;
int
turn
;
int
turn
;
short
curMsg
;
short
curMsg
;
...
@@ -70,6 +71,10 @@ struct DuelInfo {
...
@@ -70,6 +71,10 @@ struct DuelInfo {
unsigned
char
time_player
;
unsigned
char
time_player
;
unsigned
short
time_limit
;
unsigned
short
time_limit
;
unsigned
short
time_left
[
2
];
unsigned
short
time_left
[
2
];
wchar_t
str_time_left
[
2
][
16
];
video
::
SColor
time_color
[
2
];
wchar_t
str_card_count
[
2
][
16
];
video
::
SColor
card_count_color
[
2
];
bool
isReplaySwapped
;
bool
isReplaySwapped
;
};
};
...
@@ -102,6 +107,7 @@ public:
...
@@ -102,6 +107,7 @@ public:
bool
Initialize
();
bool
Initialize
();
#endif
#endif
void
MainLoop
();
void
MainLoop
();
void
RefreshTimeDisplay
();
void
BuildProjectionMatrix
(
irr
::
core
::
matrix4
&
mProjection
,
f32
left
,
f32
right
,
f32
bottom
,
f32
top
,
f32
znear
,
f32
zfar
);
void
BuildProjectionMatrix
(
irr
::
core
::
matrix4
&
mProjection
,
f32
left
,
f32
right
,
f32
bottom
,
f32
top
,
f32
znear
,
f32
zfar
);
void
InitStaticText
(
irr
::
gui
::
IGUIStaticText
*
pControl
,
u32
cWidth
,
u32
cHeight
,
irr
::
gui
::
CGUITTFont
*
font
,
const
wchar_t
*
text
);
void
InitStaticText
(
irr
::
gui
::
IGUIStaticText
*
pControl
,
u32
cWidth
,
u32
cHeight
,
irr
::
gui
::
CGUITTFont
*
font
,
const
wchar_t
*
text
);
void
SetStaticText
(
irr
::
gui
::
IGUIStaticText
*
pControl
,
u32
cWidth
,
irr
::
gui
::
CGUITTFont
*
font
,
const
wchar_t
*
text
,
u32
pos
=
0
);
void
SetStaticText
(
irr
::
gui
::
IGUIStaticText
*
pControl
,
u32
cWidth
,
irr
::
gui
::
CGUITTFont
*
font
,
const
wchar_t
*
text
,
u32
pos
=
0
);
...
@@ -117,6 +123,7 @@ public:
...
@@ -117,6 +123,7 @@ public:
void
CheckMutual
(
ClientCard
*
pcard
,
int
mark
);
void
CheckMutual
(
ClientCard
*
pcard
,
int
mark
);
void
DrawCards
();
void
DrawCards
();
void
DrawCard
(
ClientCard
*
pcard
);
void
DrawCard
(
ClientCard
*
pcard
);
void
DrawShadowText
(
irr
::
gui
::
CGUITTFont
*
font
,
const
core
::
stringw
&
text
,
const
core
::
rect
<
s32
>&
position
,
const
core
::
rect
<
s32
>&
padding
,
video
::
SColor
color
=
0xffffffff
,
video
::
SColor
shadowcolor
=
0xff000000
,
bool
hcenter
=
false
,
bool
vcenter
=
false
,
const
core
::
rect
<
s32
>*
clip
=
0
);
void
DrawMisc
();
void
DrawMisc
();
void
DrawStatus
(
ClientCard
*
pcard
,
int
x1
,
int
y1
,
int
x2
,
int
y2
);
void
DrawStatus
(
ClientCard
*
pcard
,
int
x1
,
int
y1
,
int
x2
,
int
y2
);
void
DrawGUI
();
void
DrawGUI
();
...
...
Classes/gframe/image_manager.cpp
View file @
74be9404
...
@@ -48,6 +48,7 @@ bool ImageManager::Initial(const path dir) {
...
@@ -48,6 +48,7 @@ bool ImageManager::Initial(const path dir) {
snprintf
(
buff
,
100
,
"/textures/extra/lscale_%d.png"
,
i
);
snprintf
(
buff
,
100
,
"/textures/extra/lscale_%d.png"
,
i
);
tLScale
[
i
]
=
driver
->
getTexture
((
dir
+
path
(
buff
)).
c_str
());
tLScale
[
i
]
=
driver
->
getTexture
((
dir
+
path
(
buff
)).
c_str
());
}
}
tClock
=
driver
->
getTexture
((
dir
+
path
(
"/textures/clock.png"
)).
c_str
());
support_types
.
push_back
(
std
::
string
(
"jpg"
));
support_types
.
push_back
(
std
::
string
(
"jpg"
));
support_types
.
push_back
(
std
::
string
(
"png"
));
support_types
.
push_back
(
std
::
string
(
"png"
));
support_types
.
push_back
(
std
::
string
(
"bpg"
));
support_types
.
push_back
(
std
::
string
(
"bpg"
));
...
...
Classes/gframe/image_manager.h
View file @
74be9404
...
@@ -47,6 +47,7 @@ public:
...
@@ -47,6 +47,7 @@ public:
irr
::
video
::
ITexture
*
tFieldTransparent
[
2
];
irr
::
video
::
ITexture
*
tFieldTransparent
[
2
];
irr
::
video
::
ITexture
*
tRScale
[
14
];
irr
::
video
::
ITexture
*
tRScale
[
14
];
irr
::
video
::
ITexture
*
tLScale
[
14
];
irr
::
video
::
ITexture
*
tLScale
[
14
];
irr
::
video
::
ITexture
*
tClock
;
std
::
list
<
std
::
string
>
support_types
;
std
::
list
<
std
::
string
>
support_types
;
};
};
...
...
mobile/assets/changelog.html
View file @
74be9404
...
@@ -16,7 +16,20 @@
...
@@ -16,7 +16,20 @@
特别感谢: 菜菜,尸体,废话多,龙道香姐,晓L,幻兽L 的支持与努力.
特别感谢: 菜菜,尸体,废话多,龙道香姐,晓L,幻兽L 的支持与努力.
</pre>
</pre>
<ul>
<ul>
<li
style=
"color:#ffffff"
>
3.3.1
</li>
<li
style=
"color:#ffff00"
>
3.3.1
</li>
</ul>
<pre>
更新:
1.更新ygo内核;
2.升级游戏版本号为1034.4
3.卡图全部翻新为第十期模板;
(为了回避版权问题不得已改为无字卡图)
优化:
1.精简资源缩小一些安装包体积;
2.为了避免误导用户取消直接启动游戏功能
</pre>
<ul>
<li
style=
"color:#ffff00"
>
3.3.1
</li>
</ul>
</ul>
<pre>
<pre>
更新:
更新:
...
...
mobile/assets/data/textures/clock.png
0 → 100644
View file @
74be9404
3.41 KB
mobile/build.gradle
View file @
74be9404
...
@@ -8,7 +8,7 @@ android {
...
@@ -8,7 +8,7 @@ android {
applicationId
"cn.garymb.ygomobile"
applicationId
"cn.garymb.ygomobile"
minSdkVersion
16
minSdkVersion
16
targetSdkVersion
22
targetSdkVersion
22
versionCode
3301060
3
versionCode
3301060
4
versionName
"3.3.1"
versionName
"3.3.1"
flavorDimensions
"versionCode"
flavorDimensions
"versionCode"
vectorDrawables
.
useSupportLibrary
=
true
vectorDrawables
.
useSupportLibrary
=
true
...
...
mobile/src/main/java/cn/garymb/ygomobile/Constants.java
View file @
74be9404
...
@@ -30,7 +30,7 @@ public interface Constants {
...
@@ -30,7 +30,7 @@ public interface Constants {
String
PREF_LOCK_SCREEN
=
"pref_key_game_screen_orientation"
;
String
PREF_LOCK_SCREEN
=
"pref_key_game_screen_orientation"
;
boolean
PREF_DEF_LOCK_SCREEN
=
true
;
boolean
PREF_DEF_LOCK_SCREEN
=
true
;
String
PREF_IMMERSIVE_MODE
=
"pref_key_immersive_mode"
;
String
PREF_IMMERSIVE_MODE
=
"pref_key_immersive_mode"
;
boolean
PREF_DEF_IMMERSIVE_MODE
=
fals
e
;
boolean
PREF_DEF_IMMERSIVE_MODE
=
tru
e
;
String
PREF_SENSOR_REFRESH
=
"pref_key_sensor_refresh"
;
String
PREF_SENSOR_REFRESH
=
"pref_key_sensor_refresh"
;
boolean
PREF_DEF_SENSOR_REFRESH
=
true
;
boolean
PREF_DEF_SENSOR_REFRESH
=
true
;
String
PREF_CHANGE_LOG
=
"pref_key_change_log"
;
String
PREF_CHANGE_LOG
=
"pref_key_change_log"
;
...
...
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