Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-2pick
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
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
MyCard
ygopro-2pick
Commits
aaedc7ce
Commit
aaedc7ce
authored
Jun 21, 2017
by
mercury233
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://github.com/Fluorohydride/ygopro
into server-link
parents
6e1fb3b8
d2212f89
Changes
24
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
409 additions
and
285 deletions
+409
-285
gframe/client_card.cpp
gframe/client_card.cpp
+1
-0
gframe/client_card.h
gframe/client_card.h
+1
-1
gframe/client_field.cpp
gframe/client_field.cpp
+23
-59
gframe/client_field.h
gframe/client_field.h
+6
-3
gframe/config.h
gframe/config.h
+1
-1
gframe/data_manager.cpp
gframe/data_manager.cpp
+19
-25
gframe/data_manager.h
gframe/data_manager.h
+5
-5
gframe/drawing.cpp
gframe/drawing.cpp
+82
-77
gframe/duelclient.cpp
gframe/duelclient.cpp
+42
-38
gframe/event_handler.cpp
gframe/event_handler.cpp
+39
-40
gframe/game.cpp
gframe/game.cpp
+19
-22
gframe/game.h
gframe/game.h
+3
-4
gframe/image_manager.cpp
gframe/image_manager.cpp
+3
-0
gframe/image_manager.h
gframe/image_manager.h
+1
-0
gframe/materials.cpp
gframe/materials.cpp
+4
-4
gframe/menu_handler.cpp
gframe/menu_handler.cpp
+1
-0
gframe/replay_mode.cpp
gframe/replay_mode.cpp
+1
-1
gframe/single_duel.cpp
gframe/single_duel.cpp
+1
-1
gframe/tag_duel.cpp
gframe/tag_duel.cpp
+1
-1
lflist.conf
lflist.conf
+153
-1
ocgcore
ocgcore
+1
-1
script
script
+1
-1
strings.conf
strings.conf
+1
-0
textures/chaintarget.png
textures/chaintarget.png
+0
-0
No files found.
gframe/client_card.cpp
View file @
aaedc7ce
...
@@ -16,6 +16,7 @@ ClientCard::ClientCard() {
...
@@ -16,6 +16,7 @@ ClientCard::ClientCard() {
is_selected
=
false
;
is_selected
=
false
;
is_showequip
=
false
;
is_showequip
=
false
;
is_showtarget
=
false
;
is_showtarget
=
false
;
is_showchaintarget
=
false
;
is_highlighting
=
false
;
is_highlighting
=
false
;
is_disabled
=
false
;
is_disabled
=
false
;
is_reversed
=
false
;
is_reversed
=
false
;
...
...
gframe/client_card.h
View file @
aaedc7ce
...
@@ -48,7 +48,6 @@ typedef std::unordered_map<unsigned int, CardDataC>::const_iterator code_pointer
...
@@ -48,7 +48,6 @@ typedef std::unordered_map<unsigned int, CardDataC>::const_iterator code_pointer
class
ClientCard
{
class
ClientCard
{
public:
public:
/*
/*
irr::video::ITexture* curTexture;
irr::core::matrix4 mTransform;
irr::core::matrix4 mTransform;
irr::core::vector3df curPos;
irr::core::vector3df curPos;
irr::core::vector3df curRot;
irr::core::vector3df curRot;
...
@@ -64,6 +63,7 @@ public:
...
@@ -64,6 +63,7 @@ public:
bool is_selected;
bool is_selected;
bool is_showequip;
bool is_showequip;
bool is_showtarget;
bool is_showtarget;
bool is_showchaintarget;
bool is_highlighting;
bool is_highlighting;
bool is_reversed;
bool is_reversed;
u32 code;
u32 code;
...
...
gframe/client_field.cpp
View file @
aaedc7ce
...
@@ -65,6 +65,8 @@ void ClientField::Clear() {
...
@@ -65,6 +65,8 @@ void ClientField::Clear() {
overlay_cards
.
clear
();
overlay_cards
.
clear
();
extra_p_count
[
0
]
=
0
;
extra_p_count
[
0
]
=
0
;
extra_p_count
[
1
]
=
0
;
extra_p_count
[
1
]
=
0
;
player_desc_hints
[
0
].
clear
();
player_desc_hints
[
1
].
clear
();
chains
.
clear
();
chains
.
clear
();
activatable_cards
.
clear
();
activatable_cards
.
clear
();
summonable_cards
.
clear
();
summonable_cards
.
clear
();
...
@@ -93,9 +95,7 @@ void ClientField::Initial(int player, int deckc, int extrac) {
...
@@ -93,9 +95,7 @@ void ClientField::Initial(int player, int deckc, int extrac) {
pcard
->
location
=
0x1
;
pcard
->
location
=
0x1
;
pcard
->
sequence
=
i
;
pcard
->
sequence
=
i
;
pcard
->
position
=
POS_FACEDOWN_DEFENSE
;
pcard
->
position
=
POS_FACEDOWN_DEFENSE
;
GetCardLocation
(
pcard
,
&
pcard
->
curPos
,
&
pcard
->
curRot
);
GetCardLocation
(
pcard
,
&
pcard
->
curPos
,
&
pcard
->
curRot
,
true
);
pcard
->
mTransform
.
setTranslation
(
pcard
->
curPos
);
pcard
->
mTransform
.
setRotationRadians
(
pcard
->
curRot
);
}
}
for
(
int
i
=
0
;
i
<
extrac
;
++
i
)
{
for
(
int
i
=
0
;
i
<
extrac
;
++
i
)
{
pcard
=
new
ClientCard
;
pcard
=
new
ClientCard
;
...
@@ -105,9 +105,7 @@ void ClientField::Initial(int player, int deckc, int extrac) {
...
@@ -105,9 +105,7 @@ void ClientField::Initial(int player, int deckc, int extrac) {
pcard
->
location
=
0x40
;
pcard
->
location
=
0x40
;
pcard
->
sequence
=
i
;
pcard
->
sequence
=
i
;
pcard
->
position
=
POS_FACEDOWN_DEFENSE
;
pcard
->
position
=
POS_FACEDOWN_DEFENSE
;
GetCardLocation
(
pcard
,
&
pcard
->
curPos
,
&
pcard
->
curRot
);
GetCardLocation
(
pcard
,
&
pcard
->
curPos
,
&
pcard
->
curRot
,
true
);
pcard
->
mTransform
.
setTranslation
(
pcard
->
curPos
);
pcard
->
mTransform
.
setRotationRadians
(
pcard
->
curRot
);
}
}
}
}
ClientCard
*
ClientField
::
GetCard
(
int
controler
,
int
location
,
int
sequence
,
int
sub_seq
)
{
ClientCard
*
ClientField
::
GetCard
(
int
controler
,
int
location
,
int
sequence
,
int
sub_seq
)
{
...
@@ -446,9 +444,7 @@ void ClientField::ShowSelectCard(bool buttonok, bool chain) {
...
@@ -446,9 +444,7 @@ void ClientField::ShowSelectCard(bool buttonok, bool chain) {
mainGame
->
scrCardList
->
setMax
((
selectable_cards
.
size
()
-
5
)
*
10
+
9
);
mainGame
->
scrCardList
->
setMax
((
selectable_cards
.
size
()
-
5
)
*
10
+
9
);
mainGame
->
scrCardList
->
setPos
(
0
);
mainGame
->
scrCardList
->
setPos
(
0
);
}
}
if
(
buttonok
)
mainGame
->
btnSelectOK
->
setVisible
(
buttonok
);
mainGame
->
btnSelectOK
->
setVisible
(
true
);
else
mainGame
->
btnSelectOK
->
setVisible
(
false
);
mainGame
->
PopupElement
(
mainGame
->
wCardSelect
);
mainGame
->
PopupElement
(
mainGame
->
wCardSelect
);
}
}
void
ClientField
::
ShowChainCard
()
{
void
ClientField
::
ShowChainCard
()
{
...
@@ -584,63 +580,47 @@ void ClientField::ReplaySwap() {
...
@@ -584,63 +580,47 @@ void ClientField::ReplaySwap() {
for
(
int
p
=
0
;
p
<
2
;
++
p
)
{
for
(
int
p
=
0
;
p
<
2
;
++
p
)
{
for
(
auto
cit
=
deck
[
p
].
begin
();
cit
!=
deck
[
p
].
end
();
++
cit
)
{
for
(
auto
cit
=
deck
[
p
].
begin
();
cit
!=
deck
[
p
].
end
();
++
cit
)
{
(
*
cit
)
->
controler
=
1
-
(
*
cit
)
->
controler
;
(
*
cit
)
->
controler
=
1
-
(
*
cit
)
->
controler
;
GetCardLocation
(
*
cit
,
&
(
*
cit
)
->
curPos
,
&
(
*
cit
)
->
curRot
);
GetCardLocation
(
*
cit
,
&
(
*
cit
)
->
curPos
,
&
(
*
cit
)
->
curRot
,
true
);
(
*
cit
)
->
mTransform
.
setTranslation
((
*
cit
)
->
curPos
);
(
*
cit
)
->
mTransform
.
setRotationRadians
((
*
cit
)
->
curRot
);
(
*
cit
)
->
is_moving
=
false
;
(
*
cit
)
->
is_moving
=
false
;
}
}
for
(
auto
cit
=
hand
[
p
].
begin
();
cit
!=
hand
[
p
].
end
();
++
cit
)
{
for
(
auto
cit
=
hand
[
p
].
begin
();
cit
!=
hand
[
p
].
end
();
++
cit
)
{
(
*
cit
)
->
controler
=
1
-
(
*
cit
)
->
controler
;
(
*
cit
)
->
controler
=
1
-
(
*
cit
)
->
controler
;
GetCardLocation
(
*
cit
,
&
(
*
cit
)
->
curPos
,
&
(
*
cit
)
->
curRot
);
GetCardLocation
(
*
cit
,
&
(
*
cit
)
->
curPos
,
&
(
*
cit
)
->
curRot
,
true
);
(
*
cit
)
->
mTransform
.
setTranslation
((
*
cit
)
->
curPos
);
(
*
cit
)
->
mTransform
.
setRotationRadians
((
*
cit
)
->
curRot
);
(
*
cit
)
->
is_moving
=
false
;
(
*
cit
)
->
is_moving
=
false
;
}
}
for
(
auto
cit
=
mzone
[
p
].
begin
();
cit
!=
mzone
[
p
].
end
();
++
cit
)
{
for
(
auto
cit
=
mzone
[
p
].
begin
();
cit
!=
mzone
[
p
].
end
();
++
cit
)
{
if
(
*
cit
)
{
if
(
*
cit
)
{
(
*
cit
)
->
controler
=
1
-
(
*
cit
)
->
controler
;
(
*
cit
)
->
controler
=
1
-
(
*
cit
)
->
controler
;
GetCardLocation
(
*
cit
,
&
(
*
cit
)
->
curPos
,
&
(
*
cit
)
->
curRot
);
GetCardLocation
(
*
cit
,
&
(
*
cit
)
->
curPos
,
&
(
*
cit
)
->
curRot
,
true
);
(
*
cit
)
->
mTransform
.
setTranslation
((
*
cit
)
->
curPos
);
(
*
cit
)
->
mTransform
.
setRotationRadians
((
*
cit
)
->
curRot
);
(
*
cit
)
->
is_moving
=
false
;
(
*
cit
)
->
is_moving
=
false
;
}
}
}
}
for
(
auto
cit
=
szone
[
p
].
begin
();
cit
!=
szone
[
p
].
end
();
++
cit
)
{
for
(
auto
cit
=
szone
[
p
].
begin
();
cit
!=
szone
[
p
].
end
();
++
cit
)
{
if
(
*
cit
)
{
if
(
*
cit
)
{
(
*
cit
)
->
controler
=
1
-
(
*
cit
)
->
controler
;
(
*
cit
)
->
controler
=
1
-
(
*
cit
)
->
controler
;
GetCardLocation
(
*
cit
,
&
(
*
cit
)
->
curPos
,
&
(
*
cit
)
->
curRot
);
GetCardLocation
(
*
cit
,
&
(
*
cit
)
->
curPos
,
&
(
*
cit
)
->
curRot
,
true
);
(
*
cit
)
->
mTransform
.
setTranslation
((
*
cit
)
->
curPos
);
(
*
cit
)
->
mTransform
.
setRotationRadians
((
*
cit
)
->
curRot
);
(
*
cit
)
->
is_moving
=
false
;
(
*
cit
)
->
is_moving
=
false
;
}
}
}
}
for
(
auto
cit
=
grave
[
p
].
begin
();
cit
!=
grave
[
p
].
end
();
++
cit
)
{
for
(
auto
cit
=
grave
[
p
].
begin
();
cit
!=
grave
[
p
].
end
();
++
cit
)
{
(
*
cit
)
->
controler
=
1
-
(
*
cit
)
->
controler
;
(
*
cit
)
->
controler
=
1
-
(
*
cit
)
->
controler
;
GetCardLocation
(
*
cit
,
&
(
*
cit
)
->
curPos
,
&
(
*
cit
)
->
curRot
);
GetCardLocation
(
*
cit
,
&
(
*
cit
)
->
curPos
,
&
(
*
cit
)
->
curRot
,
true
);
(
*
cit
)
->
mTransform
.
setTranslation
((
*
cit
)
->
curPos
);
(
*
cit
)
->
mTransform
.
setRotationRadians
((
*
cit
)
->
curRot
);
(
*
cit
)
->
is_moving
=
false
;
(
*
cit
)
->
is_moving
=
false
;
}
}
for
(
auto
cit
=
remove
[
p
].
begin
();
cit
!=
remove
[
p
].
end
();
++
cit
)
{
for
(
auto
cit
=
remove
[
p
].
begin
();
cit
!=
remove
[
p
].
end
();
++
cit
)
{
(
*
cit
)
->
controler
=
1
-
(
*
cit
)
->
controler
;
(
*
cit
)
->
controler
=
1
-
(
*
cit
)
->
controler
;
GetCardLocation
(
*
cit
,
&
(
*
cit
)
->
curPos
,
&
(
*
cit
)
->
curRot
);
GetCardLocation
(
*
cit
,
&
(
*
cit
)
->
curPos
,
&
(
*
cit
)
->
curRot
,
true
);
(
*
cit
)
->
mTransform
.
setTranslation
((
*
cit
)
->
curPos
);
(
*
cit
)
->
mTransform
.
setRotationRadians
((
*
cit
)
->
curRot
);
(
*
cit
)
->
is_moving
=
false
;
(
*
cit
)
->
is_moving
=
false
;
}
}
for
(
auto
cit
=
extra
[
p
].
begin
();
cit
!=
extra
[
p
].
end
();
++
cit
)
{
for
(
auto
cit
=
extra
[
p
].
begin
();
cit
!=
extra
[
p
].
end
();
++
cit
)
{
(
*
cit
)
->
controler
=
1
-
(
*
cit
)
->
controler
;
(
*
cit
)
->
controler
=
1
-
(
*
cit
)
->
controler
;
GetCardLocation
(
*
cit
,
&
(
*
cit
)
->
curPos
,
&
(
*
cit
)
->
curRot
);
GetCardLocation
(
*
cit
,
&
(
*
cit
)
->
curPos
,
&
(
*
cit
)
->
curRot
,
true
);
(
*
cit
)
->
mTransform
.
setTranslation
((
*
cit
)
->
curPos
);
(
*
cit
)
->
mTransform
.
setRotationRadians
((
*
cit
)
->
curRot
);
(
*
cit
)
->
is_moving
=
false
;
(
*
cit
)
->
is_moving
=
false
;
}
}
}
}
for
(
auto
cit
=
overlay_cards
.
begin
();
cit
!=
overlay_cards
.
end
();
++
cit
)
{
for
(
auto
cit
=
overlay_cards
.
begin
();
cit
!=
overlay_cards
.
end
();
++
cit
)
{
(
*
cit
)
->
controler
=
1
-
(
*
cit
)
->
controler
;
(
*
cit
)
->
controler
=
1
-
(
*
cit
)
->
controler
;
GetCardLocation
(
*
cit
,
&
(
*
cit
)
->
curPos
,
&
(
*
cit
)
->
curRot
);
GetCardLocation
(
*
cit
,
&
(
*
cit
)
->
curPos
,
&
(
*
cit
)
->
curRot
,
true
);
(
*
cit
)
->
mTransform
.
setTranslation
((
*
cit
)
->
curPos
);
(
*
cit
)
->
mTransform
.
setRotationRadians
((
*
cit
)
->
curRot
);
(
*
cit
)
->
is_moving
=
false
;
(
*
cit
)
->
is_moving
=
false
;
}
}
mainGame
->
dInfo
.
isFirst
=
!
mainGame
->
dInfo
.
isFirst
;
mainGame
->
dInfo
.
isFirst
=
!
mainGame
->
dInfo
.
isFirst
;
...
@@ -658,56 +638,40 @@ void ClientField::ReplaySwap() {
...
@@ -658,56 +638,40 @@ void ClientField::ReplaySwap() {
void
ClientField
::
RefreshAllCards
()
{
void
ClientField
::
RefreshAllCards
()
{
for
(
int
p
=
0
;
p
<
2
;
++
p
)
{
for
(
int
p
=
0
;
p
<
2
;
++
p
)
{
for
(
auto
cit
=
deck
[
p
].
begin
();
cit
!=
deck
[
p
].
end
();
++
cit
)
{
for
(
auto
cit
=
deck
[
p
].
begin
();
cit
!=
deck
[
p
].
end
();
++
cit
)
{
GetCardLocation
(
*
cit
,
&
(
*
cit
)
->
curPos
,
&
(
*
cit
)
->
curRot
);
GetCardLocation
(
*
cit
,
&
(
*
cit
)
->
curPos
,
&
(
*
cit
)
->
curRot
,
true
);
(
*
cit
)
->
mTransform
.
setTranslation
((
*
cit
)
->
curPos
);
(
*
cit
)
->
mTransform
.
setRotationRadians
((
*
cit
)
->
curRot
);
(
*
cit
)
->
is_moving
=
false
;
(
*
cit
)
->
is_moving
=
false
;
}
}
for
(
auto
cit
=
hand
[
p
].
begin
();
cit
!=
hand
[
p
].
end
();
++
cit
)
{
for
(
auto
cit
=
hand
[
p
].
begin
();
cit
!=
hand
[
p
].
end
();
++
cit
)
{
GetCardLocation
(
*
cit
,
&
(
*
cit
)
->
curPos
,
&
(
*
cit
)
->
curRot
);
GetCardLocation
(
*
cit
,
&
(
*
cit
)
->
curPos
,
&
(
*
cit
)
->
curRot
,
true
);
(
*
cit
)
->
mTransform
.
setTranslation
((
*
cit
)
->
curPos
);
(
*
cit
)
->
mTransform
.
setRotationRadians
((
*
cit
)
->
curRot
);
(
*
cit
)
->
is_moving
=
false
;
(
*
cit
)
->
is_moving
=
false
;
}
}
for
(
auto
cit
=
mzone
[
p
].
begin
();
cit
!=
mzone
[
p
].
end
();
++
cit
)
{
for
(
auto
cit
=
mzone
[
p
].
begin
();
cit
!=
mzone
[
p
].
end
();
++
cit
)
{
if
(
*
cit
)
{
if
(
*
cit
)
{
GetCardLocation
(
*
cit
,
&
(
*
cit
)
->
curPos
,
&
(
*
cit
)
->
curRot
);
GetCardLocation
(
*
cit
,
&
(
*
cit
)
->
curPos
,
&
(
*
cit
)
->
curRot
,
true
);
(
*
cit
)
->
mTransform
.
setTranslation
((
*
cit
)
->
curPos
);
(
*
cit
)
->
mTransform
.
setRotationRadians
((
*
cit
)
->
curRot
);
(
*
cit
)
->
is_moving
=
false
;
(
*
cit
)
->
is_moving
=
false
;
}
}
}
}
for
(
auto
cit
=
szone
[
p
].
begin
();
cit
!=
szone
[
p
].
end
();
++
cit
)
{
for
(
auto
cit
=
szone
[
p
].
begin
();
cit
!=
szone
[
p
].
end
();
++
cit
)
{
if
(
*
cit
)
{
if
(
*
cit
)
{
GetCardLocation
(
*
cit
,
&
(
*
cit
)
->
curPos
,
&
(
*
cit
)
->
curRot
);
GetCardLocation
(
*
cit
,
&
(
*
cit
)
->
curPos
,
&
(
*
cit
)
->
curRot
,
true
);
(
*
cit
)
->
mTransform
.
setTranslation
((
*
cit
)
->
curPos
);
(
*
cit
)
->
mTransform
.
setRotationRadians
((
*
cit
)
->
curRot
);
(
*
cit
)
->
is_moving
=
false
;
(
*
cit
)
->
is_moving
=
false
;
}
}
}
}
for
(
auto
cit
=
grave
[
p
].
begin
();
cit
!=
grave
[
p
].
end
();
++
cit
)
{
for
(
auto
cit
=
grave
[
p
].
begin
();
cit
!=
grave
[
p
].
end
();
++
cit
)
{
GetCardLocation
(
*
cit
,
&
(
*
cit
)
->
curPos
,
&
(
*
cit
)
->
curRot
);
GetCardLocation
(
*
cit
,
&
(
*
cit
)
->
curPos
,
&
(
*
cit
)
->
curRot
,
true
);
(
*
cit
)
->
mTransform
.
setTranslation
((
*
cit
)
->
curPos
);
(
*
cit
)
->
mTransform
.
setRotationRadians
((
*
cit
)
->
curRot
);
(
*
cit
)
->
is_moving
=
false
;
(
*
cit
)
->
is_moving
=
false
;
}
}
for
(
auto
cit
=
remove
[
p
].
begin
();
cit
!=
remove
[
p
].
end
();
++
cit
)
{
for
(
auto
cit
=
remove
[
p
].
begin
();
cit
!=
remove
[
p
].
end
();
++
cit
)
{
GetCardLocation
(
*
cit
,
&
(
*
cit
)
->
curPos
,
&
(
*
cit
)
->
curRot
);
GetCardLocation
(
*
cit
,
&
(
*
cit
)
->
curPos
,
&
(
*
cit
)
->
curRot
,
true
);
(
*
cit
)
->
mTransform
.
setTranslation
((
*
cit
)
->
curPos
);
(
*
cit
)
->
mTransform
.
setRotationRadians
((
*
cit
)
->
curRot
);
(
*
cit
)
->
is_moving
=
false
;
(
*
cit
)
->
is_moving
=
false
;
}
}
for
(
auto
cit
=
extra
[
p
].
begin
();
cit
!=
extra
[
p
].
end
();
++
cit
)
{
for
(
auto
cit
=
extra
[
p
].
begin
();
cit
!=
extra
[
p
].
end
();
++
cit
)
{
GetCardLocation
(
*
cit
,
&
(
*
cit
)
->
curPos
,
&
(
*
cit
)
->
curRot
);
GetCardLocation
(
*
cit
,
&
(
*
cit
)
->
curPos
,
&
(
*
cit
)
->
curRot
,
true
);
(
*
cit
)
->
mTransform
.
setTranslation
((
*
cit
)
->
curPos
);
(
*
cit
)
->
mTransform
.
setRotationRadians
((
*
cit
)
->
curRot
);
(
*
cit
)
->
is_moving
=
false
;
(
*
cit
)
->
is_moving
=
false
;
}
}
}
}
for
(
auto
cit
=
overlay_cards
.
begin
();
cit
!=
overlay_cards
.
end
();
++
cit
)
{
for
(
auto
cit
=
overlay_cards
.
begin
();
cit
!=
overlay_cards
.
end
();
++
cit
)
{
GetCardLocation
(
*
cit
,
&
(
*
cit
)
->
curPos
,
&
(
*
cit
)
->
curRot
);
GetCardLocation
(
*
cit
,
&
(
*
cit
)
->
curPos
,
&
(
*
cit
)
->
curRot
,
true
);
(
*
cit
)
->
mTransform
.
setTranslation
((
*
cit
)
->
curPos
);
(
*
cit
)
->
mTransform
.
setRotationRadians
((
*
cit
)
->
curRot
);
(
*
cit
)
->
is_moving
=
false
;
(
*
cit
)
->
is_moving
=
false
;
}
}
}
}
...
@@ -715,7 +679,7 @@ void ClientField::GetChainLocation(int controler, int location, int sequence, ir
...
@@ -715,7 +679,7 @@ void ClientField::GetChainLocation(int controler, int location, int sequence, ir
t
->
X
=
0
;
t
->
X
=
0
;
t
->
Y
=
0
;
t
->
Y
=
0
;
t
->
Z
=
0
;
t
->
Z
=
0
;
int
rule
=
(
mainGame
->
dInfo
.
duel_rule
>=
3
)
?
1
:
0
;
int
rule
=
(
mainGame
->
dInfo
.
duel_rule
>=
4
)
?
1
:
0
;
switch
((
location
&
0x7f
))
{
switch
((
location
&
0x7f
))
{
case
LOCATION_DECK
:
{
case
LOCATION_DECK
:
{
t
->
X
=
(
matManager
.
vFieldDeck
[
controler
][
0
].
Pos
.
X
+
matManager
.
vFieldDeck
[
controler
][
1
].
Pos
.
X
)
/
2
;
t
->
X
=
(
matManager
.
vFieldDeck
[
controler
][
0
].
Pos
.
X
+
matManager
.
vFieldDeck
[
controler
][
1
].
Pos
.
X
)
/
2
;
...
@@ -771,7 +735,7 @@ void ClientField::GetCardLocation(ClientCard* pcard, irr::core::vector3df* t, ir
...
@@ -771,7 +735,7 @@ void ClientField::GetCardLocation(ClientCard* pcard, irr::core::vector3df* t, ir
int
controler
=
pcard
->
controler
;
int
controler
=
pcard
->
controler
;
int
sequence
=
pcard
->
sequence
;
int
sequence
=
pcard
->
sequence
;
int
location
=
pcard
->
location
;
int
location
=
pcard
->
location
;
int
rule
=
(
mainGame
->
dInfo
.
duel_rule
>=
3
)
?
1
:
0
;
int
rule
=
(
mainGame
->
dInfo
.
duel_rule
>=
4
)
?
1
:
0
;
switch
(
location
)
{
switch
(
location
)
{
case
LOCATION_DECK
:
{
case
LOCATION_DECK
:
{
t
->
X
=
(
matManager
.
vFieldDeck
[
controler
][
0
].
Pos
.
X
+
matManager
.
vFieldDeck
[
controler
][
1
].
Pos
.
X
)
/
2
;
t
->
X
=
(
matManager
.
vFieldDeck
[
controler
][
0
].
Pos
.
X
+
matManager
.
vFieldDeck
[
controler
][
1
].
Pos
.
X
)
/
2
;
...
...
gframe/client_field.h
View file @
aaedc7ce
...
@@ -4,12 +4,13 @@
...
@@ -4,12 +4,13 @@
#include "config.h"
#include "config.h"
/*
/*
#include <vector>
#include <vector>
#include <set>
namespace ygo {
namespace ygo {
class ClientCard;
class ClientCard;
struct ChainInfo{
struct ChainInfo
{
irr::core::vector3df chain_pos;
irr::core::vector3df chain_pos;
ClientCard* chain_card;
ClientCard* chain_card;
int code;
int code;
...
@@ -18,6 +19,7 @@ struct ChainInfo{
...
@@ -18,6 +19,7 @@ struct ChainInfo{
int location;
int location;
int sequence;
int sequence;
bool solved;
bool solved;
std::set<ClientCard*> target;
};
};
class ClientField: public irr::IEventReceiver {
class ClientField: public irr::IEventReceiver {
...
@@ -80,7 +82,7 @@ public:
...
@@ -80,7 +82,7 @@ public:
bool last_chain;
bool last_chain;
bool deck_reversed;
bool deck_reversed;
bool conti_selecting;
bool conti_selecting;
ClientField();
ClientField();
void Clear();
void Clear();
void Initial(int player, int deckc, int extrac);
void Initial(int player, int deckc, int extrac);
...
@@ -97,7 +99,7 @@ public:
...
@@ -97,7 +99,7 @@ public:
void ShowLocationCard();
void ShowLocationCard();
void ReplaySwap();
void ReplaySwap();
void RefreshAllCards();
void RefreshAllCards();
void GetChainLocation(int controler, int location, int sequence, irr::core::vector3df* t);
void GetChainLocation(int controler, int location, int sequence, irr::core::vector3df* t);
void GetCardLocation(ClientCard* pcard, irr::core::vector3df* t, irr::core::vector3df* r, bool setTrans = false);
void GetCardLocation(ClientCard* pcard, irr::core::vector3df* t, irr::core::vector3df* r, bool setTrans = false);
void MoveCard(ClientCard* pcard, int frame);
void MoveCard(ClientCard* pcard, int frame);
...
@@ -133,6 +135,7 @@ public:
...
@@ -133,6 +135,7 @@ public:
void ShowMenu(int flag, int x, int y);
void ShowMenu(int flag, int x, int y);
void UpdateChainButtons();
void UpdateChainButtons();
void ShowCancelOrFinishButton(int buttonOp);
void ShowCancelOrFinishButton(int buttonOp);
void SetShowMark(ClientCard* pcard, bool enable);
void SetResponseSelectedCards() const;
void SetResponseSelectedCards() const;
};
};
...
...
gframe/config.h
View file @
aaedc7ce
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
#pragma once
#pragma once
#define _IRR_STATIC_LIB_
#define _IRR_STATIC_LIB_
#define
_
IRR_COMPILE_WITH_DX9_DEV_PACK
#define IRR_COMPILE_WITH_DX9_DEV_PACK
#ifdef _WIN32
#ifdef _WIN32
#include <WinSock2.h>
#include <WinSock2.h>
...
...
gframe/data_manager.cpp
View file @
aaedc7ce
...
@@ -91,28 +91,20 @@ bool DataManager::LoadStrings(const char* file) {
...
@@ -91,28 +91,20 @@ bool DataManager::LoadStrings(const char* file) {
sscanf
(
linebuf
,
"!%s"
,
strbuf
);
sscanf
(
linebuf
,
"!%s"
,
strbuf
);
if
(
!
strcmp
(
strbuf
,
"system"
))
{
if
(
!
strcmp
(
strbuf
,
"system"
))
{
sscanf
(
&
linebuf
[
7
],
"%d %240[^
\n
]"
,
&
value
,
strbuf
);
sscanf
(
&
linebuf
[
7
],
"%d %240[^
\n
]"
,
&
value
,
strbuf
);
int
len
=
BufferIO
::
DecodeUTF8
(
strbuf
,
strBuffer
);
BufferIO
::
DecodeUTF8
(
strbuf
,
strBuffer
);
wchar_t
*
pbuf
=
new
wchar_t
[
len
+
1
];
_sysStrings
[
value
]
=
strBuffer
;
wcscpy
(
pbuf
,
strBuffer
);
_sysStrings
[
value
]
=
pbuf
;
}
else
if
(
!
strcmp
(
strbuf
,
"victory"
))
{
}
else
if
(
!
strcmp
(
strbuf
,
"victory"
))
{
sscanf
(
&
linebuf
[
8
],
"%x %240[^
\n
]"
,
&
value
,
strbuf
);
sscanf
(
&
linebuf
[
8
],
"%x %240[^
\n
]"
,
&
value
,
strbuf
);
int
len
=
BufferIO
::
DecodeUTF8
(
strbuf
,
strBuffer
);
BufferIO
::
DecodeUTF8
(
strbuf
,
strBuffer
);
wchar_t
*
pbuf
=
new
wchar_t
[
len
+
1
];
_victoryStrings
[
value
]
=
strBuffer
;
wcscpy
(
pbuf
,
strBuffer
);
_victoryStrings
[
value
]
=
pbuf
;
}
else
if
(
!
strcmp
(
strbuf
,
"counter"
))
{
}
else
if
(
!
strcmp
(
strbuf
,
"counter"
))
{
sscanf
(
&
linebuf
[
8
],
"%x %240[^
\n
]"
,
&
value
,
strbuf
);
sscanf
(
&
linebuf
[
8
],
"%x %240[^
\n
]"
,
&
value
,
strbuf
);
int
len
=
BufferIO
::
DecodeUTF8
(
strbuf
,
strBuffer
);
BufferIO
::
DecodeUTF8
(
strbuf
,
strBuffer
);
wchar_t
*
pbuf
=
new
wchar_t
[
len
+
1
];
_counterStrings
[
value
]
=
strBuffer
;
wcscpy
(
pbuf
,
strBuffer
);
_counterStrings
[
value
]
=
pbuf
;
}
else
if
(
!
strcmp
(
strbuf
,
"setname"
))
{
}
else
if
(
!
strcmp
(
strbuf
,
"setname"
))
{
sscanf
(
&
linebuf
[
8
],
"%x %240[^
\t\n
]"
,
&
value
,
strbuf
);
//using tab for comment
sscanf
(
&
linebuf
[
8
],
"%x %240[^
\t\n
]"
,
&
value
,
strbuf
);
//using tab for comment
int
len
=
BufferIO
::
DecodeUTF8
(
strbuf
,
strBuffer
);
BufferIO
::
DecodeUTF8
(
strbuf
,
strBuffer
);
wchar_t
*
pbuf
=
new
wchar_t
[
len
+
1
];
_setnameStrings
[
value
]
=
strBuffer
;
wcscpy
(
pbuf
,
strBuffer
);
_setnameStrings
[
value
]
=
pbuf
;
}
}
}
}
fclose
(
fp
);
fclose
(
fp
);
...
@@ -177,33 +169,35 @@ const wchar_t* DataManager::GetDesc(int strCode) {
...
@@ -177,33 +169,35 @@ const wchar_t* DataManager::GetDesc(int strCode) {
return
unknown_string
;
return
unknown_string
;
}
}
const
wchar_t
*
DataManager
::
GetSysString
(
int
code
)
{
const
wchar_t
*
DataManager
::
GetSysString
(
int
code
)
{
if
(
code
<
0
||
code
>=
2048
||
_sysStrings
[
code
]
==
0
)
if
(
code
<
0
||
code
>=
2048
)
return
unknown_string
;
return
unknown_string
;
return
_sysStrings
[
code
];
auto
csit
=
_sysStrings
.
find
(
code
);
if
(
csit
==
_sysStrings
.
end
())
return
unknown_string
;
return
csit
->
second
.
c_str
();
}
}
const
wchar_t
*
DataManager
::
GetVictoryString
(
int
code
)
{
const
wchar_t
*
DataManager
::
GetVictoryString
(
int
code
)
{
auto
csit
=
_victoryStrings
.
find
(
code
);
auto
csit
=
_victoryStrings
.
find
(
code
);
if
(
csit
==
_victoryStrings
.
end
())
if
(
csit
==
_victoryStrings
.
end
())
return
unknown_string
;
return
unknown_string
;
return
csit
->
second
;
return
csit
->
second
.
c_str
()
;
}
}
const
wchar_t
*
DataManager
::
GetCounterName
(
int
code
)
{
const
wchar_t
*
DataManager
::
GetCounterName
(
int
code
)
{
auto
csit
=
_counterStrings
.
find
(
code
);
auto
csit
=
_counterStrings
.
find
(
code
);
if
(
csit
==
_counterStrings
.
end
())
if
(
csit
==
_counterStrings
.
end
())
return
unknown_string
;
return
unknown_string
;
return
csit
->
second
;
return
csit
->
second
.
c_str
()
;
}
}
const
wchar_t
*
DataManager
::
GetSetName
(
int
code
)
{
const
wchar_t
*
DataManager
::
GetSetName
(
int
code
)
{
auto
csit
=
_setnameStrings
.
find
(
code
);
auto
csit
=
_setnameStrings
.
find
(
code
);
if
(
csit
==
_setnameStrings
.
end
())
if
(
csit
==
_setnameStrings
.
end
())
return
NULL
;
return
NULL
;
return
csit
->
second
;
return
csit
->
second
.
c_str
()
;
}
}
unsigned
int
DataManager
::
GetSetCode
(
const
wchar_t
*
setname
)
{
unsigned
int
DataManager
::
GetSetCode
(
const
wchar_t
*
setname
)
{
wchar_t
strbuff
[
256
];
for
(
auto
csit
=
_setnameStrings
.
begin
();
csit
!=
_setnameStrings
.
end
();
++
csit
)
{
for
(
auto
csit
=
_setnameStrings
.
begin
();
csit
!=
_setnameStrings
.
end
();
++
csit
)
{
swscanf
(
csit
->
second
,
L"%[^|]"
,
strbuff
);
//setname|extra info
auto
xpos
=
csit
->
second
.
find_first_of
(
L'|'
);
//setname|extra info
if
(
wcscmp
(
strbuff
,
setname
)
==
0
)
if
(
csit
->
second
.
compare
(
0
,
xpos
,
setname
)
==
0
)
return
csit
->
first
;
return
csit
->
first
;
}
}
return
0
;
return
0
;
...
@@ -292,7 +286,7 @@ const wchar_t* DataManager::FormatSetName(unsigned long long setcode) {
...
@@ -292,7 +286,7 @@ const wchar_t* DataManager::FormatSetName(unsigned long long setcode) {
for
(
int
i
=
0
;
i
<
4
;
++
i
)
{
for
(
int
i
=
0
;
i
<
4
;
++
i
)
{
const
wchar_t
*
setname
=
GetSetName
((
setcode
>>
i
*
16
)
&
0xffff
);
const
wchar_t
*
setname
=
GetSetName
((
setcode
>>
i
*
16
)
&
0xffff
);
if
(
setname
)
{
if
(
setname
)
{
BufferIO
::
CopyWStrRef
(
setname
,
p
,
16
);
BufferIO
::
CopyWStrRef
(
setname
,
p
,
32
);
*
p
=
L'|'
;
*
p
=
L'|'
;
*++
p
=
0
;
*++
p
=
0
;
}
}
...
...
gframe/data_manager.h
View file @
aaedc7ce
...
@@ -35,11 +35,11 @@ public:
...
@@ -35,11 +35,11 @@ public:
std
::
unordered_map
<
unsigned
int
,
CardDataC
>
_datas
;
std
::
unordered_map
<
unsigned
int
,
CardDataC
>
_datas
;
std
::
unordered_map
<
unsigned
int
,
CardString
>
_strings
;
std
::
unordered_map
<
unsigned
int
,
CardString
>
_strings
;
std
::
unordered_map
<
unsigned
int
,
wchar_t
*>
_counterStrings
;
std
::
unordered_map
<
unsigned
int
,
std
::
wstring
>
_counterStrings
;
std
::
unordered_map
<
unsigned
int
,
wchar_t
*>
_victoryStrings
;
std
::
unordered_map
<
unsigned
int
,
std
::
wstring
>
_victoryStrings
;
std
::
unordered_map
<
unsigned
int
,
wchar_t
*>
_setnameStrings
;
std
::
unordered_map
<
unsigned
int
,
std
::
wstring
>
_setnameStrings
;
std
::
unordered_map
<
unsigned
int
,
std
::
wstring
>
_sysStrings
;
wchar_t
*
_sysStrings
[
2048
];
wchar_t
numStrings
[
256
][
4
];
wchar_t
numStrings
[
256
][
4
];
wchar_t
numBuffer
[
6
];
wchar_t
numBuffer
[
6
];
wchar_t
attBuffer
[
128
];
wchar_t
attBuffer
[
128
];
...
@@ -51,7 +51,7 @@ public:
...
@@ -51,7 +51,7 @@ public:
static
wchar_t
strBuffer
[
4096
];
static
wchar_t
strBuffer
[
4096
];
static
const
wchar_t
*
unknown_string
;
static
const
wchar_t
*
unknown_string
;
static
int
CardReader
(
int
,
void
*
);
static
int
CardReader
(
int
,
void
*
);
};
};
extern
DataManager
dataManager
;
extern
DataManager
dataManager
;
...
...
gframe/drawing.cpp
View file @
aaedc7ce
This diff is collapsed.
Click to expand it.
gframe/duelclient.cpp
View file @
aaedc7ce
This diff is collapsed.
Click to expand it.
gframe/event_handler.cpp
View file @
aaedc7ce
...
@@ -29,7 +29,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
...
@@ -29,7 +29,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
case
BUTTON_HAND2
:
case
BUTTON_HAND2
:
case
BUTTON_HAND3
:
{
case
BUTTON_HAND3
:
{
mainGame
->
wHand
->
setVisible
(
false
);
mainGame
->
wHand
->
setVisible
(
false
);
if
(
mainGame
->
dInfo
.
curMsg
==
MSG_ROCK_PAPER_SCISSORS
){
if
(
mainGame
->
dInfo
.
curMsg
==
MSG_ROCK_PAPER_SCISSORS
)
{
DuelClient
::
SetResponseI
(
id
-
BUTTON_HAND1
+
1
);
DuelClient
::
SetResponseI
(
id
-
BUTTON_HAND1
+
1
);
DuelClient
::
SendResponse
();
DuelClient
::
SendResponse
();
}
else
{
}
else
{
...
@@ -130,8 +130,6 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
...
@@ -130,8 +130,6 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
mainGame
->
ShowElement
(
mainGame
->
wLanWindow
);
mainGame
->
ShowElement
(
mainGame
->
wLanWindow
);
}
else
{
}
else
{
DuelClient
::
SendPacketToServer
(
CTOS_SURRENDER
);
DuelClient
::
SendPacketToServer
(
CTOS_SURRENDER
);
if
(
panel
)
mainGame
->
HideElement
(
panel
);
}
}
break
;
break
;
}
}
...
@@ -206,7 +204,6 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
...
@@ -206,7 +204,6 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
else
else
DuelClient
::
SendResponse
();
DuelClient
::
SendResponse
();
}
}
break
;
}
}
if
(
mainGame
->
wQuery
->
isVisible
())
{
if
(
mainGame
->
wQuery
->
isVisible
())
{
SetResponseSelectedCards
();
SetResponseSelectedCards
();
...
@@ -668,6 +665,10 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
...
@@ -668,6 +665,10 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
ShowSelectCard
(
true
);
ShowSelectCard
(
true
);
break
;
break
;
}
}
case
BUTTON_PHASE
:
{
mainGame
->
btnPhaseStatus
->
setPressed
(
true
);
break
;
}
case
BUTTON_BP
:
{
case
BUTTON_BP
:
{
if
(
mainGame
->
dInfo
.
curMsg
==
MSG_SELECT_IDLECMD
)
{
if
(
mainGame
->
dInfo
.
curMsg
==
MSG_SELECT_IDLECMD
)
{
DuelClient
::
SetResponseI
(
6
);
DuelClient
::
SetResponseI
(
6
);
...
@@ -711,6 +712,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
...
@@ -711,6 +712,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
while
(
spsummonable_cards
[
index
]
!=
command_card
)
index
++
;
while
(
spsummonable_cards
[
index
]
!=
command_card
)
index
++
;
DuelClient
::
SetResponseI
((
index
<<
16
)
+
1
);
DuelClient
::
SetResponseI
((
index
<<
16
)
+
1
);
mainGame
->
HideElement
(
mainGame
->
wCardSelect
,
true
);
mainGame
->
HideElement
(
mainGame
->
wCardSelect
,
true
);
ShowCancelOrFinishButton
(
0
);
break
;
break
;
}
}
if
(
list_command
==
COMMAND_ACTIVATE
||
list_command
==
COMMAND_OPERATION
)
{
if
(
list_command
==
COMMAND_ACTIVATE
||
list_command
==
COMMAND_OPERATION
)
{
...
@@ -1567,7 +1569,6 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
...
@@ -1567,7 +1569,6 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
else
else
DuelClient
::
SendResponse
();
DuelClient
::
SendResponse
();
}
}
break
;
}
}
if
(
mainGame
->
wQuery
->
isVisible
())
{
if
(
mainGame
->
wQuery
->
isVisible
())
{
SetResponseSelectedCards
();
SetResponseSelectedCards
();
...
@@ -1694,7 +1695,6 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
...
@@ -1694,7 +1695,6 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
mplayer
=
1
;
mplayer
=
1
;
}
}
}
}
if
(
hovered_location
==
LOCATION_HAND
&&
(
mainGame
->
dInfo
.
is_shuffling
||
mainGame
->
dInfo
.
curMsg
==
MSG_SHUFFLE_HAND
))
if
(
hovered_location
==
LOCATION_HAND
&&
(
mainGame
->
dInfo
.
is_shuffling
||
mainGame
->
dInfo
.
curMsg
==
MSG_SHUFFLE_HAND
))
mcard
=
0
;
mcard
=
0
;
if
(
mcard
==
0
&&
mplayer
<
0
)
if
(
mcard
==
0
&&
mplayer
<
0
)
...
@@ -1714,17 +1714,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
...
@@ -1714,17 +1714,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
if
(
hovered_controler
==
0
)
if
(
hovered_controler
==
0
)
mainGame
->
hideChat
=
false
;
mainGame
->
hideChat
=
false
;
}
}
if
(
hovered_card
->
equipTarget
)
SetShowMark
(
hovered_card
,
false
);
hovered_card
->
equipTarget
->
is_showequip
=
false
;
if
(
hovered_card
->
equipped
.
size
())
for
(
auto
cit
=
hovered_card
->
equipped
.
begin
();
cit
!=
hovered_card
->
equipped
.
end
();
++
cit
)
(
*
cit
)
->
is_showequip
=
false
;
if
(
hovered_card
->
cardTarget
.
size
())
for
(
auto
cit
=
hovered_card
->
cardTarget
.
begin
();
cit
!=
hovered_card
->
cardTarget
.
end
();
++
cit
)
(
*
cit
)
->
is_showtarget
=
false
;
if
(
hovered_card
->
ownerTarget
.
size
())
for
(
auto
cit
=
hovered_card
->
ownerTarget
.
begin
();
cit
!=
hovered_card
->
ownerTarget
.
end
();
++
cit
)
(
*
cit
)
->
is_showtarget
=
false
;
}
}
if
(
mcard
)
{
if
(
mcard
)
{
if
(
mcard
!=
clicked_card
)
if
(
mcard
!=
clicked_card
)
...
@@ -1735,14 +1725,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
...
@@ -1735,14 +1725,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
if
(
hovered_controler
==
0
)
if
(
hovered_controler
==
0
)
mainGame
->
hideChat
=
true
;
mainGame
->
hideChat
=
true
;
}
}
if
(
mcard
->
equipTarget
)
SetShowMark
(
mcard
,
true
);
mcard
->
equipTarget
->
is_showequip
=
true
;
for
(
auto
cit
=
mcard
->
equipped
.
begin
();
cit
!=
mcard
->
equipped
.
end
();
++
cit
)
(
*
cit
)
->
is_showequip
=
true
;
for
(
auto
cit
=
mcard
->
cardTarget
.
begin
();
cit
!=
mcard
->
cardTarget
.
end
();
++
cit
)
(
*
cit
)
->
is_showtarget
=
true
;
for
(
auto
cit
=
mcard
->
ownerTarget
.
begin
();
cit
!=
mcard
->
ownerTarget
.
end
();
++
cit
)
(
*
cit
)
->
is_showtarget
=
true
;
if
(
mcard
->
code
)
{
if
(
mcard
->
code
)
{
mainGame
->
ShowCardInfo
(
mcard
->
code
);
mainGame
->
ShowCardInfo
(
mcard
->
code
);
if
(
mcard
->
location
&
0xe
)
{
if
(
mcard
->
location
&
0xe
)
{
...
@@ -2010,7 +1993,7 @@ void ClientField::GetHoverField(int x, int y) {
...
@@ -2010,7 +1993,7 @@ void ClientField::GetHoverField(int x, int y) {
irr
::
core
::
recti
sfRect
(
430
,
504
,
875
,
600
);
irr
::
core
::
recti
sfRect
(
430
,
504
,
875
,
600
);
irr
::
core
::
recti
ofRect
(
531
,
135
,
800
,
191
);
irr
::
core
::
recti
ofRect
(
531
,
135
,
800
,
191
);
irr
::
core
::
position2di
pos
(
x
,
y
);
irr
::
core
::
position2di
pos
(
x
,
y
);
int
rule
=
(
mainGame
->
dInfo
.
duel_rule
>=
3
)
?
1
:
0
;
int
rule
=
(
mainGame
->
dInfo
.
duel_rule
>=
4
)
?
1
:
0
;
if
(
sfRect
.
isPointInside
(
pos
))
{
if
(
sfRect
.
isPointInside
(
pos
))
{
int
hc
=
hand
[
0
].
size
();
int
hc
=
hand
[
0
].
size
();
int
cardSize
=
66
;
int
cardSize
=
66
;
...
@@ -2085,10 +2068,10 @@ void ClientField::GetHoverField(int x, int y) {
...
@@ -2085,10 +2068,10 @@ void ClientField::GetHoverField(int x, int y) {
hovered_controler
=
0
;
hovered_controler
=
0
;
hovered_location
=
LOCATION_SZONE
;
hovered_location
=
LOCATION_SZONE
;
hovered_sequence
=
6
;
hovered_sequence
=
6
;
}
else
if
(
rule
==
1
&&
boardy
>=
matManager
.
vFieldRemove
[
1
][
rule
][
2
].
Pos
.
Y
&&
boardy
<=
matManager
.
vFieldRemove
[
1
][
rule
][
0
].
Pos
.
Y
)
{
}
else
if
(
rule
==
1
&&
boardy
>=
matManager
.
vFieldRemove
[
1
][
rule
][
2
].
Pos
.
Y
&&
boardy
<=
matManager
.
vFieldRemove
[
1
][
rule
][
0
].
Pos
.
Y
)
{
hovered_controler
=
1
;
hovered_controler
=
1
;
hovered_location
=
LOCATION_REMOVED
;
hovered_location
=
LOCATION_REMOVED
;
}
else
if
(
rule
==
0
&&
boardy
>=
matManager
.
vFieldSzone
[
1
][
7
][
rule
][
2
].
Pos
.
Y
&&
boardy
<=
matManager
.
vFieldSzone
[
1
][
7
][
rule
][
0
].
Pos
.
Y
)
{
}
else
if
(
rule
==
0
&&
boardy
>=
matManager
.
vFieldSzone
[
1
][
7
][
rule
][
2
].
Pos
.
Y
&&
boardy
<=
matManager
.
vFieldSzone
[
1
][
7
][
rule
][
0
].
Pos
.
Y
)
{
hovered_controler
=
1
;
hovered_controler
=
1
;
hovered_location
=
LOCATION_SZONE
;
hovered_location
=
LOCATION_SZONE
;
hovered_sequence
=
7
;
hovered_sequence
=
7
;
...
@@ -2099,22 +2082,20 @@ void ClientField::GetHoverField(int x, int y) {
...
@@ -2099,22 +2082,20 @@ void ClientField::GetHoverField(int x, int y) {
hovered_controler
=
1
;
hovered_controler
=
1
;
hovered_location
=
LOCATION_DECK
;
hovered_location
=
LOCATION_DECK
;
}
}
}
else
if
(
rule
==
0
&&
boardx
>=
matManager
.
vFieldRemove
[
1
][
rule
][
1
].
Pos
.
X
&&
boardx
<=
matManager
.
vFieldRemove
[
1
][
rule
][
0
].
Pos
.
X
)
{
}
else
if
(
boardx
>=
matManager
.
vFieldContiAct
[
0
].
X
&&
boardx
<=
matManager
.
vFieldContiAct
[
1
].
X
&&
boardy
>=
matManager
.
vFieldContiAct
[
0
].
Y
&&
boardy
<=
matManager
.
vFieldContiAct
[
2
].
Y
)
{
hovered_controler
=
0
;
hovered_location
=
POSITION_HINT
;
}
else
if
(
rule
==
0
&&
boardx
>=
matManager
.
vFieldRemove
[
1
][
rule
][
1
].
Pos
.
X
&&
boardx
<=
matManager
.
vFieldRemove
[
1
][
rule
][
0
].
Pos
.
X
)
{
if
(
boardy
>=
matManager
.
vFieldRemove
[
1
][
rule
][
2
].
Pos
.
Y
&&
boardy
<=
matManager
.
vFieldRemove
[
1
][
rule
][
0
].
Pos
.
Y
)
{
if
(
boardy
>=
matManager
.
vFieldRemove
[
1
][
rule
][
2
].
Pos
.
Y
&&
boardy
<=
matManager
.
vFieldRemove
[
1
][
rule
][
0
].
Pos
.
Y
)
{
hovered_controler
=
1
;
hovered_controler
=
1
;
hovered_location
=
LOCATION_REMOVED
;
hovered_location
=
LOCATION_REMOVED
;
}
else
if
(
boardy
>=
matManager
.
vFieldContiAct
[
0
].
Y
&&
boardy
<=
matManager
.
vFieldContiAct
[
2
].
Y
)
{
hovered_controler
=
0
;
hovered_location
=
POSITION_HINT
;
}
}
}
else
if
(
rule
==
1
&&
boardx
>=
matManager
.
vFieldSzone
[
1
][
7
][
rule
][
1
].
Pos
.
X
&&
boardx
<=
matManager
.
vFieldSzone
[
1
][
7
][
rule
][
2
].
Pos
.
X
)
{
}
else
if
(
rule
==
1
&&
boardx
>=
matManager
.
vFieldSzone
[
1
][
7
][
rule
][
1
].
Pos
.
X
&&
boardx
<=
matManager
.
vFieldSzone
[
1
][
7
][
rule
][
2
].
Pos
.
X
)
{
if
(
boardy
>=
matManager
.
vFieldSzone
[
1
][
7
][
rule
][
2
].
Pos
.
Y
&&
boardy
<=
matManager
.
vFieldSzone
[
1
][
7
][
rule
][
0
].
Pos
.
Y
)
{
if
(
boardy
>=
matManager
.
vFieldSzone
[
1
][
7
][
rule
][
2
].
Pos
.
Y
&&
boardy
<=
matManager
.
vFieldSzone
[
1
][
7
][
rule
][
0
].
Pos
.
Y
)
{
hovered_controler
=
1
;
hovered_controler
=
1
;
hovered_location
=
LOCATION_SZONE
;
hovered_location
=
LOCATION_SZONE
;
hovered_sequence
=
7
;
hovered_sequence
=
7
;
}
else
if
(
boardy
>=
matManager
.
vFieldContiAct
[
0
].
Y
&&
boardy
<=
matManager
.
vFieldContiAct
[
2
].
Y
)
{
hovered_controler
=
0
;
hovered_location
=
POSITION_HINT
;
}
}
}
else
if
(
boardx
>=
matManager
.
vFieldDeck
[
0
][
0
].
Pos
.
X
&&
boardx
<=
matManager
.
vFieldDeck
[
0
][
1
].
Pos
.
X
)
{
}
else
if
(
boardx
>=
matManager
.
vFieldDeck
[
0
][
0
].
Pos
.
X
&&
boardx
<=
matManager
.
vFieldDeck
[
0
][
1
].
Pos
.
X
)
{
if
(
boardy
>=
matManager
.
vFieldDeck
[
0
][
0
].
Pos
.
Y
&&
boardy
<=
matManager
.
vFieldDeck
[
0
][
2
].
Pos
.
Y
)
{
if
(
boardy
>=
matManager
.
vFieldDeck
[
0
][
0
].
Pos
.
Y
&&
boardy
<=
matManager
.
vFieldDeck
[
0
][
2
].
Pos
.
Y
)
{
...
@@ -2127,11 +2108,11 @@ void ClientField::GetHoverField(int x, int y) {
...
@@ -2127,11 +2108,11 @@ void ClientField::GetHoverField(int x, int y) {
hovered_controler
=
1
;
hovered_controler
=
1
;
hovered_location
=
LOCATION_SZONE
;
hovered_location
=
LOCATION_SZONE
;
hovered_sequence
=
6
;
hovered_sequence
=
6
;
}
else
if
(
rule
==
0
&&
boardy
>=
matManager
.
vFieldSzone
[
0
][
7
][
rule
][
0
].
Pos
.
Y
&&
boardy
<=
matManager
.
vFieldSzone
[
0
][
7
][
rule
][
2
].
Pos
.
Y
)
{
}
else
if
(
rule
==
0
&&
boardy
>=
matManager
.
vFieldSzone
[
0
][
7
][
rule
][
0
].
Pos
.
Y
&&
boardy
<=
matManager
.
vFieldSzone
[
0
][
7
][
rule
][
2
].
Pos
.
Y
)
{
hovered_controler
=
0
;
hovered_controler
=
0
;
hovered_location
=
LOCATION_SZONE
;
hovered_location
=
LOCATION_SZONE
;
hovered_sequence
=
7
;
hovered_sequence
=
7
;
}
else
if
(
rule
==
1
&&
boardy
>=
matManager
.
vFieldRemove
[
0
][
rule
][
0
].
Pos
.
Y
&&
boardy
<=
matManager
.
vFieldRemove
[
0
][
rule
][
2
].
Pos
.
Y
)
{
}
else
if
(
rule
==
1
&&
boardy
>=
matManager
.
vFieldRemove
[
0
][
rule
][
0
].
Pos
.
Y
&&
boardy
<=
matManager
.
vFieldRemove
[
0
][
rule
][
2
].
Pos
.
Y
)
{
hovered_controler
=
0
;
hovered_controler
=
0
;
hovered_location
=
LOCATION_REMOVED
;
hovered_location
=
LOCATION_REMOVED
;
}
else
if
(
boardy
>=
matManager
.
vFieldSzone
[
1
][
5
][
rule
][
2
].
Pos
.
Y
&&
boardy
<=
matManager
.
vFieldSzone
[
1
][
5
][
rule
][
0
].
Pos
.
Y
)
{
}
else
if
(
boardy
>=
matManager
.
vFieldSzone
[
1
][
5
][
rule
][
2
].
Pos
.
Y
&&
boardy
<=
matManager
.
vFieldSzone
[
1
][
5
][
rule
][
0
].
Pos
.
Y
)
{
...
@@ -2142,13 +2123,13 @@ void ClientField::GetHoverField(int x, int y) {
...
@@ -2142,13 +2123,13 @@ void ClientField::GetHoverField(int x, int y) {
hovered_controler
=
1
;
hovered_controler
=
1
;
hovered_location
=
LOCATION_EXTRA
;
hovered_location
=
LOCATION_EXTRA
;
}
}
}
else
if
(
rule
==
0
&&
boardx
>=
matManager
.
vFieldSzone
[
0
][
7
][
rule
][
0
].
Pos
.
X
&&
boardx
<=
matManager
.
vFieldSzone
[
0
][
7
][
rule
][
1
].
Pos
.
X
)
{
}
else
if
(
rule
==
0
&&
boardx
>=
matManager
.
vFieldSzone
[
0
][
7
][
rule
][
0
].
Pos
.
X
&&
boardx
<=
matManager
.
vFieldSzone
[
0
][
7
][
rule
][
1
].
Pos
.
X
)
{
if
(
boardy
>=
matManager
.
vFieldSzone
[
0
][
7
][
rule
][
0
].
Pos
.
Y
&&
boardy
<=
matManager
.
vFieldSzone
[
0
][
7
][
rule
][
2
].
Pos
.
Y
)
{
if
(
boardy
>=
matManager
.
vFieldSzone
[
0
][
7
][
rule
][
0
].
Pos
.
Y
&&
boardy
<=
matManager
.
vFieldSzone
[
0
][
7
][
rule
][
2
].
Pos
.
Y
)
{
hovered_controler
=
0
;
hovered_controler
=
0
;
hovered_location
=
LOCATION_SZONE
;
hovered_location
=
LOCATION_SZONE
;
hovered_sequence
=
7
;
hovered_sequence
=
7
;
}
}
}
else
if
(
rule
==
0
&&
boardx
>=
matManager
.
vFieldRemove
[
0
][
rule
][
0
].
Pos
.
X
&&
boardx
<=
matManager
.
vFieldRemove
[
0
][
rule
][
1
].
Pos
.
X
)
{
}
else
if
(
rule
==
0
&&
boardx
>=
matManager
.
vFieldRemove
[
0
][
rule
][
0
].
Pos
.
X
&&
boardx
<=
matManager
.
vFieldRemove
[
0
][
rule
][
1
].
Pos
.
X
)
{
if
(
boardy
>=
matManager
.
vFieldRemove
[
0
][
rule
][
0
].
Pos
.
Y
&&
boardy
<=
matManager
.
vFieldRemove
[
0
][
rule
][
2
].
Pos
.
Y
)
{
if
(
boardy
>=
matManager
.
vFieldRemove
[
0
][
rule
][
0
].
Pos
.
Y
&&
boardy
<=
matManager
.
vFieldRemove
[
0
][
rule
][
2
].
Pos
.
Y
)
{
hovered_controler
=
0
;
hovered_controler
=
0
;
hovered_location
=
LOCATION_REMOVED
;
hovered_location
=
LOCATION_REMOVED
;
...
@@ -2296,6 +2277,24 @@ void ClientField::ShowCancelOrFinishButton(int buttonOp) {
...
@@ -2296,6 +2277,24 @@ void ClientField::ShowCancelOrFinishButton(int buttonOp) {
mainGame
->
btnCancelOrFinish
->
setVisible
(
false
);
mainGame
->
btnCancelOrFinish
->
setVisible
(
false
);
}
}
}
}
void
ClientField
::
SetShowMark
(
ClientCard
*
pcard
,
bool
enable
)
{
if
(
pcard
->
equipTarget
)
pcard
->
equipTarget
->
is_showequip
=
enable
;
for
(
auto
cit
=
pcard
->
equipped
.
begin
();
cit
!=
pcard
->
equipped
.
end
();
++
cit
)
(
*
cit
)
->
is_showequip
=
enable
;
for
(
auto
cit
=
pcard
->
cardTarget
.
begin
();
cit
!=
pcard
->
cardTarget
.
end
();
++
cit
)
(
*
cit
)
->
is_showtarget
=
enable
;
for
(
auto
cit
=
pcard
->
ownerTarget
.
begin
();
cit
!=
pcard
->
ownerTarget
.
end
();
++
cit
)
(
*
cit
)
->
is_showtarget
=
enable
;
for
(
auto
chit
=
chains
.
begin
();
chit
!=
chains
.
end
();
++
chit
)
{
if
(
pcard
==
chit
->
chain_card
)
{
for
(
auto
tgit
=
chit
->
target
.
begin
();
tgit
!=
chit
->
target
.
end
();
++
tgit
)
(
*
tgit
)
->
is_showchaintarget
=
enable
;
}
if
(
chit
->
target
.
find
(
pcard
)
!=
chit
->
target
.
end
())
chit
->
chain_card
->
is_showchaintarget
=
enable
;
}
}
void
ClientField
::
SetResponseSelectedCards
()
const
{
void
ClientField
::
SetResponseSelectedCards
()
const
{
unsigned
char
respbuf
[
64
];
unsigned
char
respbuf
[
64
];
respbuf
[
0
]
=
selected_cards
.
size
();
respbuf
[
0
]
=
selected_cards
.
size
();
...
...
gframe/game.cpp
View file @
aaedc7ce
...
@@ -101,8 +101,6 @@ bool Game::Initialize() {
...
@@ -101,8 +101,6 @@ bool Game::Initialize() {
is_building = false;
is_building = false;
memset(&dInfo, 0, sizeof(DuelInfo));
memset(&dInfo, 0, sizeof(DuelInfo));
memset(chatTiming, 0, sizeof(chatTiming));
memset(chatTiming, 0, sizeof(chatTiming));
for(int i = 0; i < 2048; ++i)
dataManager._sysStrings[i] = 0;
deckManager.LoadLFList();
deckManager.LoadLFList();
driver = device->getVideoDriver();
driver = device->getVideoDriver();
driver->setTextureCreationFlag(irr::video::ETCF_CREATE_MIP_MAPS, false);
driver->setTextureCreationFlag(irr::video::ETCF_CREATE_MIP_MAPS, false);
...
@@ -201,7 +199,7 @@ bool Game::Initialize() {
...
@@ -201,7 +199,7 @@ bool Game::Initialize() {
cbDuelRule->addItem(dataManager.GetSysString(1261));
cbDuelRule->addItem(dataManager.GetSysString(1261));
cbDuelRule->addItem(dataManager.GetSysString(1262));
cbDuelRule->addItem(dataManager.GetSysString(1262));
cbDuelRule->addItem(dataManager.GetSysString(1263));
cbDuelRule->addItem(dataManager.GetSysString(1263));
cbDuelRule->setSelected(DEFAULT_DUEL_RULE);
cbDuelRule->setSelected(DEFAULT_DUEL_RULE
- 1
);
chkNoCheckDeck = env->addCheckBox(false, rect<s32>(20, 210, 170, 230), wCreateHost, -1, dataManager.GetSysString(1229));
chkNoCheckDeck = env->addCheckBox(false, rect<s32>(20, 210, 170, 230), wCreateHost, -1, dataManager.GetSysString(1229));
chkNoShuffleDeck = env->addCheckBox(false, rect<s32>(180, 210, 360, 230), wCreateHost, -1, dataManager.GetSysString(1230));
chkNoShuffleDeck = env->addCheckBox(false, rect<s32>(180, 210, 360, 230), wCreateHost, -1, dataManager.GetSysString(1230));
env->addStaticText(dataManager.GetSysString(1231), rect<s32>(20, 240, 320, 260), false, false, wCreateHost);
env->addStaticText(dataManager.GetSysString(1231), rect<s32>(20, 240, 320, 260), false, false, wCreateHost);
...
@@ -259,26 +257,16 @@ bool Game::Initialize() {
...
@@ -259,26 +257,16 @@ bool Game::Initialize() {
//phase
//phase
wPhase = env->addStaticText(L"", rect<s32>(480, 310, 855, 330));
wPhase = env->addStaticText(L"", rect<s32>(480, 310, 855, 330));
wPhase->setVisible(false);
wPhase->setVisible(false);
btnDP = env->addButton(rect<s32>(0, 0, 50, 20), wPhase, -1, L"\xff24\xff30");
btnPhaseStatus = env->addButton(rect<s32>(0, 0, 50, 20), wPhase, BUTTON_PHASE, L"");
btnDP->setEnabled(false);
btnPhaseStatus->setIsPushButton(true);
btnDP->setPressed(true);
btnPhaseStatus->setPressed(true);
btnDP->setVisible(false);
btnPhaseStatus->setVisible(false);
btnSP = env->addButton(rect<s32>(65, 0, 115, 20), wPhase, -1, L"\xff33\xff30");
btnBP = env->addButton(rect<s32>(160, 0, 210, 20), wPhase, BUTTON_BP, L"\xff22\xff30");
btnSP->setEnabled(false);
btnSP->setPressed(true);
btnSP->setVisible(false);
btnM1 = env->addButton(rect<s32>(130, 0, 180, 20), wPhase, -1, L"\xff2d\xff11");
btnM1->setEnabled(false);
btnM1->setPressed(true);
btnM1->setVisible(false);
btnBP = env->addButton(rect<s32>(195, 0, 245, 20), wPhase, BUTTON_BP, L"\xff22\xff30");
btnBP->setVisible(false);
btnBP->setVisible(false);
btnM2 = env->addButton(rect<s32>(
260, 0, 3
10, 20), wPhase, BUTTON_M2, L"\xff2d\xff12");
btnM2 = env->addButton(rect<s32>(
160, 0, 2
10, 20), wPhase, BUTTON_M2, L"\xff2d\xff12");
btnM2->setVisible(false);
btnM2->setVisible(false);
btnEP = env->addButton(rect<s32>(32
5, 0, 375
, 20), wPhase, BUTTON_EP, L"\xff25\xff30");
btnEP = env->addButton(rect<s32>(32
0, 0, 370
, 20), wPhase, BUTTON_EP, L"\xff25\xff30");
btnEP->setVisible(false);
btnEP->setVisible(false);
btnShuffle = env->addButton(rect<s32>(0, 0, 50, 20), wPhase, BUTTON_CMD_SHUFFLE, dataManager.GetSysString(1307));
btnShuffle->setVisible(false);
//tab
//tab
wInfos = env->addTabControl(rect<s32>(1, 275, 301, 639), 0, true);
wInfos = env->addTabControl(rect<s32>(1, 275, 301, 639), 0, true);
wInfos->setVisible(false);
wInfos->setVisible(false);
...
@@ -639,6 +627,9 @@ bool Game::Initialize() {
...
@@ -639,6 +627,9 @@ bool Game::Initialize() {
//cancel or finish
//cancel or finish
btnCancelOrFinish = env->addButton(rect<s32>(205, 230, 295, 265), 0, BUTTON_CANCEL_OR_FINISH, dataManager.GetSysString(1295));
btnCancelOrFinish = env->addButton(rect<s32>(205, 230, 295, 265), 0, BUTTON_CANCEL_OR_FINISH, dataManager.GetSysString(1295));
btnCancelOrFinish->setVisible(false);
btnCancelOrFinish->setVisible(false);
//shuffle
btnShuffle = env->addButton(rect<s32>(205, 230, 295, 265), 0, BUTTON_CMD_SHUFFLE, dataManager.GetSysString(1297));
btnShuffle->setVisible(false);
//leave/surrender/exit
//leave/surrender/exit
btnLeaveGame = env->addButton(rect<s32>(205, 5, 295, 80), 0, BUTTON_LEAVE_GAME, L"");
btnLeaveGame = env->addButton(rect<s32>(205, 5, 295, 80), 0, BUTTON_LEAVE_GAME, L"");
btnLeaveGame->setVisible(false);
btnLeaveGame->setVisible(false);
...
@@ -784,12 +775,16 @@ void Game::InitStaticText(irr::gui::IGUIStaticText* pControl, u32 cWidth, u32 cH
...
@@ -784,12 +775,16 @@ void Game::InitStaticText(irr::gui::IGUIStaticText* pControl, u32 cWidth, u32 cH
void Game::SetStaticText(irr::gui::IGUIStaticText* pControl, u32 cWidth, irr::gui::CGUITTFont* font, const wchar_t* text, u32 pos) {
void Game::SetStaticText(irr::gui::IGUIStaticText* pControl, u32 cWidth, irr::gui::CGUITTFont* font, const wchar_t* text, u32 pos) {
int pbuffer = 0;
int pbuffer = 0;
u32 _width = 0, _height = 0;
u32 _width = 0, _height = 0;
wchar_t prev = 0;
for(size_t i = 0; text[i] != 0 && i < wcslen(text); ++i) {
for(size_t i = 0; text[i] != 0 && i < wcslen(text); ++i) {
u32 w = font->getCharDimension(text[i]).Width;
wchar_t c = text[i];
u32 w = font->getCharDimension(c).Width + font->getKerningWidth(c, prev);
prev = c;
if(text[i] == L'\n') {
if(text[i] == L'\n') {
dataManager.strBuffer[pbuffer++] = L'\n';
dataManager.strBuffer[pbuffer++] = L'\n';
_width = 0;
_width = 0;
_height++;
_height++;
prev = 0;
if(_height == pos)
if(_height == pos)
pbuffer = 0;
pbuffer = 0;
continue;
continue;
...
@@ -797,11 +792,12 @@ void Game::SetStaticText(irr::gui::IGUIStaticText* pControl, u32 cWidth, irr::gu
...
@@ -797,11 +792,12 @@ void Game::SetStaticText(irr::gui::IGUIStaticText* pControl, u32 cWidth, irr::gu
dataManager.strBuffer[pbuffer++] = L'\n';
dataManager.strBuffer[pbuffer++] = L'\n';
_width = 0;
_width = 0;
_height++;
_height++;
prev = 0;
if(_height == pos)
if(_height == pos)
pbuffer = 0;
pbuffer = 0;
}
}
_width += w;
_width += w;
dataManager.strBuffer[pbuffer++] =
text[i]
;
dataManager.strBuffer[pbuffer++] =
c
;
}
}
dataManager.strBuffer[pbuffer] = 0;
dataManager.strBuffer[pbuffer] = 0;
pControl->setText(dataManager.strBuffer);
pControl->setText(dataManager.strBuffer);
...
@@ -1270,6 +1266,7 @@ void Game::CloseDuelWindow() {
...
@@ -1270,6 +1266,7 @@ void Game::CloseDuelWindow() {
btnChainAlways->setVisible(false);
btnChainAlways->setVisible(false);
btnChainWhenAvail->setVisible(false);
btnChainWhenAvail->setVisible(false);
btnCancelOrFinish->setVisible(false);
btnCancelOrFinish->setVisible(false);
btnShuffle->setVisible(false);
wChat->setVisible(false);
wChat->setVisible(false);
lstLog->clear();
lstLog->clear();
logParam.clear();
logParam.clear();
...
...
gframe/game.h
View file @
aaedc7ce
...
@@ -356,9 +356,7 @@ public:
...
@@ -356,9 +356,7 @@ public:
irr::gui::IGUICheckBox* chkIgnore2;
irr::gui::IGUICheckBox* chkIgnore2;
//phase button
//phase button
irr::gui::IGUIStaticText* wPhase;
irr::gui::IGUIStaticText* wPhase;
irr::gui::IGUIButton* btnDP;
irr::gui::IGUIButton* btnPhaseStatus;
irr::gui::IGUIButton* btnSP;
irr::gui::IGUIButton* btnM1;
irr::gui::IGUIButton* btnBP;
irr::gui::IGUIButton* btnBP;
irr::gui::IGUIButton* btnM2;
irr::gui::IGUIButton* btnM2;
irr::gui::IGUIButton* btnEP;
irr::gui::IGUIButton* btnEP;
...
@@ -527,6 +525,7 @@ extern unsigned char draw_count;
...
@@ -527,6 +525,7 @@ extern unsigned char draw_count;
#define BUTTON_CHAIN_ALWAYS 265
#define BUTTON_CHAIN_ALWAYS 265
#define BUTTON_CHAIN_WHENAVAIL 266
#define BUTTON_CHAIN_WHENAVAIL 266
#define BUTTON_CANCEL_OR_FINISH 267
#define BUTTON_CANCEL_OR_FINISH 267
#define BUTTON_PHASE 268
#define BUTTON_CLEAR_LOG 270
#define BUTTON_CLEAR_LOG 270
#define LISTBOX_LOG 271
#define LISTBOX_LOG 271
#define SCROLL_CARDTEXT 280
#define SCROLL_CARDTEXT 280
...
@@ -571,5 +570,5 @@ extern unsigned char draw_count;
...
@@ -571,5 +570,5 @@ extern unsigned char draw_count;
#define BUTTON_MARKS_FILTER 380
#define BUTTON_MARKS_FILTER 380
#define BUTTON_MARKERS_OK 381
#define BUTTON_MARKERS_OK 381
#define DEFAULT_DUEL_RULE
3
#define DEFAULT_DUEL_RULE
4
#endif // GAME_H
#endif // GAME_H
gframe/image_manager.cpp
View file @
aaedc7ce
...
@@ -7,6 +7,8 @@ ImageManager imageManager;
...
@@ -7,6 +7,8 @@ ImageManager imageManager;
bool
ImageManager
::
Initial
()
{
bool
ImageManager
::
Initial
()
{
tCover
[
0
]
=
driver
->
getTexture
(
"textures/cover.jpg"
);
tCover
[
0
]
=
driver
->
getTexture
(
"textures/cover.jpg"
);
tCover
[
1
]
=
driver
->
getTexture
(
"textures/cover2.jpg"
);
tCover
[
1
]
=
driver
->
getTexture
(
"textures/cover2.jpg"
);
if
(
!
tCover
[
1
])
tCover
[
1
]
=
tCover
[
0
];
tUnknown
=
driver
->
getTexture
(
"textures/unknown.jpg"
);
tUnknown
=
driver
->
getTexture
(
"textures/unknown.jpg"
);
tAct
=
driver
->
getTexture
(
"textures/act.png"
);
tAct
=
driver
->
getTexture
(
"textures/act.png"
);
tAttack
=
driver
->
getTexture
(
"textures/attack.png"
);
tAttack
=
driver
->
getTexture
(
"textures/attack.png"
);
...
@@ -18,6 +20,7 @@ bool ImageManager::Initial() {
...
@@ -18,6 +20,7 @@ bool ImageManager::Initial() {
tMask
=
driver
->
getTexture
(
"textures/mask.png"
);
tMask
=
driver
->
getTexture
(
"textures/mask.png"
);
tEquip
=
driver
->
getTexture
(
"textures/equip.png"
);
tEquip
=
driver
->
getTexture
(
"textures/equip.png"
);
tTarget
=
driver
->
getTexture
(
"textures/target.png"
);
tTarget
=
driver
->
getTexture
(
"textures/target.png"
);
tChainTarget
=
driver
->
getTexture
(
"textures/chaintarget.png"
);
tLim
=
driver
->
getTexture
(
"textures/lim.png"
);
tLim
=
driver
->
getTexture
(
"textures/lim.png"
);
tOT
=
driver
->
getTexture
(
"textures/ot.png"
);
tOT
=
driver
->
getTexture
(
"textures/ot.png"
);
tHand
[
0
]
=
driver
->
getTexture
(
"textures/f1.jpg"
);
tHand
[
0
]
=
driver
->
getTexture
(
"textures/f1.jpg"
);
...
...
gframe/image_manager.h
View file @
aaedc7ce
...
@@ -34,6 +34,7 @@ public:
...
@@ -34,6 +34,7 @@ public:
irr
::
video
::
ITexture
*
tMask
;
irr
::
video
::
ITexture
*
tMask
;
irr
::
video
::
ITexture
*
tEquip
;
irr
::
video
::
ITexture
*
tEquip
;
irr
::
video
::
ITexture
*
tTarget
;
irr
::
video
::
ITexture
*
tTarget
;
irr
::
video
::
ITexture
*
tChainTarget
;
irr
::
video
::
ITexture
*
tLim
;
irr
::
video
::
ITexture
*
tLim
;
irr
::
video
::
ITexture
*
tOT
;
irr
::
video
::
ITexture
*
tOT
;
irr
::
video
::
ITexture
*
tHand
[
3
];
irr
::
video
::
ITexture
*
tHand
[
3
];
...
...
gframe/materials.cpp
View file @
aaedc7ce
...
@@ -237,10 +237,10 @@ Materials::Materials() {
...
@@ -237,10 +237,10 @@ Materials::Materials() {
SetS3DVertex
(
vFieldSzone
[
1
][
7
][
1
],
0.0
f
,
-
0.1
f
,
-
0.8
f
,
-
1.3
f
,
0
,
1
,
0
,
0
,
0
,
0
);
SetS3DVertex
(
vFieldSzone
[
1
][
7
][
1
],
0.0
f
,
-
0.1
f
,
-
0.8
f
,
-
1.3
f
,
0
,
1
,
0
,
0
,
0
,
0
);
//conti_act
//conti_act
vFieldContiAct
[
0
]
=
vector3df
(
-
0.8
f
,
0.1
f
,
0.0
f
);
vFieldContiAct
[
0
]
=
vector3df
(
3.5
f
,
-
0.6
f
,
0.0
f
);
vFieldContiAct
[
1
]
=
vector3df
(
0.0
f
,
0.1
f
,
0.0
f
);
vFieldContiAct
[
1
]
=
vector3df
(
4.4
f
,
-
0.6
f
,
0.0
f
);
vFieldContiAct
[
2
]
=
vector3df
(
-
0.8
f
,
1.3
f
,
0.0
f
);
vFieldContiAct
[
2
]
=
vector3df
(
3.5
f
,
0.6
f
,
0.0
f
);
vFieldContiAct
[
3
]
=
vector3df
(
0.0
f
,
1.3
f
,
0.0
f
);
vFieldContiAct
[
3
]
=
vector3df
(
4.4
f
,
0.6
f
,
0.0
f
);
for
(
int
i
=
0
;
i
<
40
;
++
i
)
for
(
int
i
=
0
;
i
<
40
;
++
i
)
...
...
gframe/menu_handler.cpp
View file @
aaedc7ce
...
@@ -108,6 +108,7 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) {
...
@@ -108,6 +108,7 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) {
break
;
break
;
}
}
case
BUTTON_HP_DUELIST
:
{
case
BUTTON_HP_DUELIST
:
{
mainGame
->
cbDeckSelect
->
setEnabled
(
true
);
DuelClient
::
SendPacketToServer
(
CTOS_HS_TODUELIST
);
DuelClient
::
SendPacketToServer
(
CTOS_HS_TODUELIST
);
break
;
break
;
}
}
...
...
gframe/replay_mode.cpp
View file @
aaedc7ce
...
@@ -81,7 +81,7 @@ int ReplayMode::ReplayThread(void* param) {
...
@@ -81,7 +81,7 @@ int ReplayMode::ReplayThread(void* param) {
int
draw_count
=
cur_replay
.
ReadInt32
();
int
draw_count
=
cur_replay
.
ReadInt32
();
int
opt
=
cur_replay
.
ReadInt32
();
int
opt
=
cur_replay
.
ReadInt32
();
int
duel_rule
=
opt
>>
16
;
int
duel_rule
=
opt
>>
16
;
mainGame
->
dInfo
.
duel_rule
=
duel_rule
-
1
;
mainGame
->
dInfo
.
duel_rule
=
duel_rule
;
set_player_info
(
pduel
,
0
,
start_lp
,
start_hand
,
draw_count
);
set_player_info
(
pduel
,
0
,
start_lp
,
start_hand
,
draw_count
);
set_player_info
(
pduel
,
1
,
start_lp
,
start_hand
,
draw_count
);
set_player_info
(
pduel
,
1
,
start_lp
,
start_hand
,
draw_count
);
mainGame
->
dInfo
.
lp
[
0
]
=
start_lp
;
mainGame
->
dInfo
.
lp
[
0
]
=
start_lp
;
...
...
gframe/single_duel.cpp
View file @
aaedc7ce
...
@@ -500,7 +500,7 @@ void SingleDuel::TPResult(DuelPlayer* dp, unsigned char tp) {
...
@@ -500,7 +500,7 @@ void SingleDuel::TPResult(DuelPlayer* dp, unsigned char tp) {
pduel
=
create_duel
(
rnd
.
rand
());
pduel
=
create_duel
(
rnd
.
rand
());
set_player_info
(
pduel
,
0
,
host_info
.
start_lp
,
host_info
.
start_hand
,
host_info
.
draw_count
);
set_player_info
(
pduel
,
0
,
host_info
.
start_lp
,
host_info
.
start_hand
,
host_info
.
draw_count
);
set_player_info
(
pduel
,
1
,
host_info
.
start_lp
,
host_info
.
start_hand
,
host_info
.
draw_count
);
set_player_info
(
pduel
,
1
,
host_info
.
start_lp
,
host_info
.
start_hand
,
host_info
.
draw_count
);
int
opt
=
(
(
int
)
host_info
.
duel_rule
+
1
)
<<
16
;
int
opt
=
(
int
)
host_info
.
duel_rule
<<
16
;
if
(
host_info
.
no_shuffle_deck
)
if
(
host_info
.
no_shuffle_deck
)
opt
|=
DUEL_PSEUDO_SHUFFLE
;
opt
|=
DUEL_PSEUDO_SHUFFLE
;
last_replay
.
WriteInt32
(
host_info
.
start_lp
,
false
);
last_replay
.
WriteInt32
(
host_info
.
start_lp
,
false
);
...
...
gframe/tag_duel.cpp
View file @
aaedc7ce
...
@@ -467,7 +467,7 @@ void TagDuel::TPResult(DuelPlayer* dp, unsigned char tp) {
...
@@ -467,7 +467,7 @@ void TagDuel::TPResult(DuelPlayer* dp, unsigned char tp) {
pduel
=
create_duel
(
rnd
.
rand
());
pduel
=
create_duel
(
rnd
.
rand
());
set_player_info
(
pduel
,
0
,
host_info
.
start_lp
,
host_info
.
start_hand
,
host_info
.
draw_count
);
set_player_info
(
pduel
,
0
,
host_info
.
start_lp
,
host_info
.
start_hand
,
host_info
.
draw_count
);
set_player_info
(
pduel
,
1
,
host_info
.
start_lp
,
host_info
.
start_hand
,
host_info
.
draw_count
);
set_player_info
(
pduel
,
1
,
host_info
.
start_lp
,
host_info
.
start_hand
,
host_info
.
draw_count
);
int
opt
=
(
(
int
)
host_info
.
duel_rule
+
1
)
<<
16
;
int
opt
=
(
int
)
host_info
.
duel_rule
<<
16
;
if
(
host_info
.
no_shuffle_deck
)
if
(
host_info
.
no_shuffle_deck
)
opt
|=
DUEL_PSEUDO_SHUFFLE
;
opt
|=
DUEL_PSEUDO_SHUFFLE
;
opt
|=
DUEL_TAG_MODE
;
opt
|=
DUEL_TAG_MODE
;
...
...
lflist.conf
View file @
aaedc7ce
#[2017.4][2017.6 TCG][2017.1][2016.10][2016.7][2016.4][2016.1][2015.10][2015.4][2015.1][2014.10][2014.7][2014.4][2014.2][2013.9][2017.3 TCG][2016.8 TCG][2016.4 TCG][2015.11 TCG][2015.7 TCG][2015.4 TCG][2015.1 TCG][2014.10 TCG][2014.7 TCG][2014.4 TCG][2014.1.1 TCG][2013.10.11 TCG][2013.3.1][2012.9.1][2012.3.1][2011.9.1]
#[2017.7][2017.4][2017.6 TCG][2017.1][2016.10][2016.7][2016.4][2016.1][2015.10][2015.4][2015.1][2014.10][2014.7][2014.4][2014.2][2013.9][2017.3 TCG][2016.8 TCG][2016.4 TCG][2015.11 TCG][2015.7 TCG][2015.4 TCG][2015.1 TCG][2014.10 TCG][2014.7 TCG][2014.4 TCG][2014.1.1 TCG][2013.10.11 TCG][2013.3.1][2012.9.1][2012.3.1][2011.9.1]
!
2017
.
7
#forbidden
20663556
0
--イレカエル
44910027
0
--ヴィクトリー・ドラゴン
20366274
0
--エルシャドール・ネフィリム
53804307
0
--焔征竜-ブラスター
68819554
0
--
Em
ダメージ・ジャグラー
07563579
0
--
Em
ヒグルミ
17330916
0
--
EM
モンキーボード
90411554
0
--巌征竜-レドックス
17412721
0
--旧神ノーデン
34124316
0
--サイバーポッド
88071625
0
--
The
tyrant
NEPTUNE
48905153
0
--十二獣ドランシア
85115440
0
--十二獣ブルホーン
21593977
0
--処刑人-マキュラ
16923472
0
--ゼンマイハンター
56570271
0
--
D
-
HERO
ディスクガイ
18326736
0
--星守の騎士 プトレマイオス
33184167
0
--同族感染ウィルス
54719828
0
--
No
.
16
色の支配者ショック・ルーラー
26400609
0
--瀑征竜-タイダル
78706415
0
--ファイバーポッド
93369354
0
--フィッシュボーグ-ガンナー
31178212
0
--マジェスペクター・ユニコーン
34206604
0
--魔導サイエンティスト
96782886
0
--メンタルマスター
03078576
0
--八汰烏
34086406
0
--ラヴァルバル・チェイン
89399912
0
--嵐征竜-テンペスト
57421866
0
--レベル・スティーラー
41482598
0
--悪夢の蜃気楼
44763025
0
--いたずら好きな双子悪魔
19613556
0
--大嵐
17375316
0
--押収
74191942
0
--苦渋の選択
42829885
0
--強引な番兵
45986603
0
--強奪
55144522
0
--強欲な壺
04031928
0
--心変わり
46060017
0
--十二獣の会局
12580477
0
--サンダー·ボルト
23557835
0
--次元融合
57953380
0
--生還の宝札
60682203
0
--大寒波
69243953
0
--蝶の短剣-エルマ
79571449
0
--天使の施し
70828912
0
--早すぎた埋葬
42703248
0
--ハリケーン
34906152
0
--マスドライバー
46448938
0
--魔導書の神判
46411259
0
--突然変異
85602018
0
--遺言状
27174286
0
--異次元からの帰還
93016201
0
--王宮の弾圧
03280747
0
--第六感
64697231
0
--ダスト·シュート
80604091
0
--血の代償
35316708
0
--刻の封印
17178486
0
--ライフチェンジャー
28566710
0
--ラストバトル!
#limit
64034255
1
--
A
·ジェネクス·バードマン
50720316
1
--
E
·
HERO
シャドー·ミスト
40318957
1
--
EM
ドクロバット・ジョーカー
74586817
1
--
PSY
フレームロード・Ω
78872731
1
--十二獣モルモラット
06602300
1
--重爆撃禽 ボム・フェネクス
00423585
1
--召喚僧サモンプリースト
78868119
1
--深海のディーヴァ
21377582
1
--真竜剣皇マスター
P
81275020
1
--
SR
ベイゴマックス
65192027
1
--ダーク·アームド·ドラゴン
90953320
1
--
TG
ハイパー·ライブラリアン
69015963
1
--デビル・フランケン
16226786
1
--深淵の暗殺者
90307777
1
--影霊衣の術士 シュリット
28297833
1
--ネクロフェイス
83531441
1
--彼岸の旅人 ダンテ
70583986
1
--氷結界の虎王ドゥローレン
52687916
1
--氷結界の龍 トリシューラ
33396948
1
--封印されしエクゾディア
07902349
1
--封印されし者の左腕
70903634
1
--封印されし者の右腕
44519536
1
--封印されし者の左足
08124921
1
--封印されし者の右足
55623480
1
--妖精伝姫−シラユキ
09929398
1
--
BF
−朧影のゴウフウ
26674724
1
--ブリューナクの影霊衣
10802915
1
--魔界発現世行きデスガイド
33508719
1
--メタモルポット
90809975
1
--餅カエル
89463537
1
--ユニコールの影霊衣
92746535
1
--竜剣士ラスター
P
88264978
1
--レッドアイズ·ダークネスメタルドラゴン
33782437
1
--一時休戦
66957584
1
--インフェルニティガン
81439173
1
--おろかな埋葬
23701465
1
--原初の種
99330325
1
--妨げられた壊獣の眠り
67723438
1
--緊急テレポート
45305419
1
--継承の印
83764718
1
--死者蘇生
32807846
1
--増援
54447022
1
--ソウル・チャージ
48130397
1
--超融合
72892473
1
--手札抹殺
13035077
1
--ドラゴニック
D
67169062
1
--貪欲な壺
97211663
1
--影霊衣の反魂術
18144506
1
--ハーピィの羽根帚
22842126
1
--汎神の帝王
53208660
1
--ペンデュラム・コール
93600443
1
--マスク・チェンジ・セカンド
15854426
1
--霞の谷の神風
77565204
1
--未来融合-フューチャー·フュージョン
58577036
1
--名推理
23171610
1
--リミッター解除
14733538
1
--竜呼相打つ
02295440
1
--ワン·フォー·ワン
05851097
1
--虚無空間
61740673
1
--王宮の勅命
84749824
1
--神の警告
41420027
1
--神の宣告
36468556
1
--停戦協定
83555666
1
--破壊輪
32723153
1
--マジカル·エクスプロージョン
#semi limit
45222299
2
--イビリチュア·ガストクラーケ
40044918
2
--
E
·
HERO
エアーマン
47075569
2
--
EM
ペンデュラム・マジシャン
74311226
2
--海皇の竜騎隊
78010363
2
--黒き森のウィッチ
15341821
2
--ダンディライオン
84764038
2
--彼岸の悪鬼 スカラマリオン
10028593
2
--輪廻天狗
14878871
2
--レスキューキャット
48976825
2
--異次元からの埋葬
59750328
2
--命削りの宝札
57103969
2
--炎舞-「天璣」
96729612
2
--儀式の準備
17639150
2
--機殻の生贄
84171830
2
--真帝王領域
91623717
2
--連鎖爆撃
73628505
2
--テラ・フォーミング
53129443
2
--ブラック·ホール
43040603
2
--モンスターゲート
66399653
2
--ユニオン格納庫
31222701
2
--揺れる眼差し
62265044
2
--竜の渓谷
40605147
2
--神の通告
!
2017
.
4
!
2017
.
4
#forbidden
#forbidden
20663556
0
--イレカエル
20663556
0
--イレカエル
...
...
ocgcore
@
bec3616a
Subproject commit
051bc24924f1566ac085a21bd6e83a2ccf47035
b
Subproject commit
bec3616a8d306b6b7d438f92b6a5c3f90072db1
b
script
@
271308c7
Subproject commit
56b52944a6e0a7268265ed52461042b45b7172d0
Subproject commit
271308c734408ed525b0349afcb69000ec5679a7
strings.conf
View file @
aaedc7ce
...
@@ -302,6 +302,7 @@
...
@@ -302,6 +302,7 @@
!
system
1294
可用时点
!
system
1294
可用时点
!
system
1295
取消操作
!
system
1295
取消操作
!
system
1296
完成选择
!
system
1296
完成选择
!
system
1297
切洗手卡
!
system
1300
禁限卡表:
!
system
1300
禁限卡表:
!
system
1301
卡组列表:
!
system
1301
卡组列表:
!
system
1302
保存
!
system
1302
保存
...
...
textures/chaintarget.png
0 → 100644
View file @
aaedc7ce
2.3 KB
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