Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro
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
Commits
03cc48c7
Commit
03cc48c7
authored
Jun 20, 2017
by
mercury233
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://github.com/Fluorohydride/ygopro
into link
parents
d7103c77
1edbd101
Changes
15
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
311 additions
and
177 deletions
+311
-177
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
+19
-57
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
+18
-24
gframe/data_manager.h
gframe/data_manager.h
+5
-5
gframe/drawing.cpp
gframe/drawing.cpp
+56
-45
gframe/duelclient.cpp
gframe/duelclient.cpp
+18
-13
gframe/event_handler.cpp
gframe/event_handler.cpp
+21
-23
gframe/game.cpp
gframe/game.cpp
+8
-4
gframe/image_manager.cpp
gframe/image_manager.cpp
+3
-0
gframe/image_manager.h
gframe/image_manager.h
+1
-0
lflist.conf
lflist.conf
+153
-1
textures/chaintarget.png
textures/chaintarget.png
+0
-0
No files found.
gframe/client_card.cpp
View file @
03cc48c7
...
@@ -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 @
03cc48c7
...
@@ -47,7 +47,6 @@ typedef std::unordered_map<unsigned int, CardDataC>::const_iterator code_pointer
...
@@ -47,7 +47,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
;
...
@@ -63,6 +62,7 @@ public:
...
@@ -63,6 +62,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 @
03cc48c7
...
@@ -93,9 +93,7 @@ void ClientField::Initial(int player, int deckc, int extrac) {
...
@@ -93,9 +93,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 +103,7 @@ void ClientField::Initial(int player, int deckc, int extrac) {
...
@@ -105,9 +103,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 +442,7 @@ void ClientField::ShowSelectCard(bool buttonok, bool chain) {
...
@@ -446,9 +442,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 +578,47 @@ void ClientField::ReplaySwap() {
...
@@ -584,63 +578,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 +636,40 @@ void ClientField::ReplaySwap() {
...
@@ -658,56 +636,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
;
}
}
}
}
...
...
gframe/client_field.h
View file @
03cc48c7
...
@@ -3,12 +3,13 @@
...
@@ -3,12 +3,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
;
...
@@ -17,6 +18,7 @@ struct ChainInfo{
...
@@ -17,6 +18,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
{
...
@@ -79,7 +81,7 @@ public:
...
@@ -79,7 +81,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
);
...
@@ -96,7 +98,7 @@ public:
...
@@ -96,7 +98,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
);
...
@@ -132,6 +134,7 @@ public:
...
@@ -132,6 +134,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 @
03cc48c7
...
@@ -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 @
03cc48c7
...
@@ -89,28 +89,20 @@ bool DataManager::LoadStrings(const char* file) {
...
@@ -89,28 +89,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
);
...
@@ -175,33 +167,35 @@ const wchar_t* DataManager::GetDesc(int strCode) {
...
@@ -175,33 +167,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
;
...
...
gframe/data_manager.h
View file @
03cc48c7
...
@@ -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 @
03cc48c7
...
@@ -24,6 +24,7 @@ void Game::DrawSelectionLine(irr::video::S3DVertex* vec, bool strip, int width,
...
@@ -24,6 +24,7 @@ void Game::DrawSelectionLine(irr::video::S3DVertex* vec, bool strip, int width,
glEnd
();
glEnd
();
glMaterialfv
(
GL_FRONT
,
GL_AMBIENT
,
origin
);
glMaterialfv
(
GL_FRONT
,
GL_AMBIENT
,
origin
);
glDisable
(
GL_LINE_STIPPLE
);
glDisable
(
GL_LINE_STIPPLE
);
glEnable
(
GL_TEXTURE_2D
);
}
else
{
}
else
{
driver
->
setMaterial
(
matManager
.
mOutLine
);
driver
->
setMaterial
(
matManager
.
mOutLine
);
if
(
strip
)
{
if
(
strip
)
{
...
@@ -49,9 +50,9 @@ void Game::DrawSelectionLine(irr::video::S3DVertex* vec, bool strip, int width,
...
@@ -49,9 +50,9 @@ void Game::DrawSelectionLine(irr::video::S3DVertex* vec, bool strip, int width,
void
Game
::
DrawBackGround
()
{
void
Game
::
DrawBackGround
()
{
static
int
selFieldAlpha
=
255
;
static
int
selFieldAlpha
=
255
;
static
int
selFieldDAlpha
=
-
10
;
static
int
selFieldDAlpha
=
-
10
;
matrix4
im
=
irr
::
core
::
IdentityMatrix
;
//
matrix4 im = irr::core::IdentityMatrix;
im
.
setTranslation
(
vector3df
(
0
,
0
,
-
0.01
f
));
//
im.setTranslation(vector3df(0, 0, -0.01f));
driver
->
setTransform
(
irr
::
video
::
ETS_WORLD
,
im
);
//
driver->setTransform(irr::video::ETS_WORLD, im);
//dark shade
//dark shade
// matManager.mSelField.AmbientColor = 0xff000000;
// matManager.mSelField.AmbientColor = 0xff000000;
// matManager.mSelField.DiffuseColor = 0xa0000000;
// matManager.mSelField.DiffuseColor = 0xa0000000;
...
@@ -64,39 +65,39 @@ void Game::DrawBackGround() {
...
@@ -64,39 +65,39 @@ void Game::DrawBackGround() {
//draw field
//draw field
//draw field spell card
//draw field spell card
driver
->
setTransform
(
irr
::
video
::
ETS_WORLD
,
irr
::
core
::
IdentityMatrix
);
driver
->
setTransform
(
irr
::
video
::
ETS_WORLD
,
irr
::
core
::
IdentityMatrix
);
int
fieldcode1
=
-
1
;
int
fieldcode2
=
-
1
;
bool
drawField
=
false
;
bool
drawField
=
false
;
int
rule
=
(
dInfo
.
duel_rule
>=
4
)
?
1
:
0
;
int
rule
=
(
dInfo
.
duel_rule
>=
4
)
?
1
:
0
;
if
(
mainGame
->
gameConf
.
draw_field_spell
if
(
mainGame
->
gameConf
.
draw_field_spell
)
{
&&
mainGame
->
dField
.
szone
[
0
][
5
]
&&
mainGame
->
dField
.
szone
[
0
][
5
]
->
position
&
POS_FACEUP
)
int
fieldcode1
=
-
1
;
fieldcode1
=
mainGame
->
dField
.
szone
[
0
][
5
]
->
code
;
int
fieldcode2
=
-
1
;
if
(
mainGame
->
gameConf
.
draw_field_spell
if
(
mainGame
->
dField
.
szone
[
0
][
5
]
&&
mainGame
->
dField
.
szone
[
0
][
5
]
->
position
&
POS_FACEUP
)
&&
mainGame
->
dField
.
szone
[
1
][
5
]
&&
mainGame
->
dField
.
szone
[
1
][
5
]
->
position
&
POS_FACEUP
)
fieldcode1
=
mainGame
->
dField
.
szone
[
0
][
5
]
->
code
;
fieldcode2
=
mainGame
->
dField
.
szone
[
1
][
5
]
->
code
;
if
(
mainGame
->
dField
.
szone
[
1
][
5
]
&&
mainGame
->
dField
.
szone
[
1
][
5
]
->
position
&
POS_FACEUP
)
int
fieldcode
=
(
fieldcode1
>
0
)
?
fieldcode1
:
fieldcode2
;
fieldcode2
=
mainGame
->
dField
.
szone
[
1
][
5
]
->
code
;
if
(
fieldcode1
>
0
&&
fieldcode2
>
0
&&
fieldcode1
!=
fieldcode2
)
{
int
fieldcode
=
(
fieldcode1
>
0
)
?
fieldcode1
:
fieldcode2
;
ITexture
*
texture
=
imageManager
.
GetTextureField
(
fieldcode1
);
if
(
fieldcode1
>
0
&&
fieldcode2
>
0
&&
fieldcode1
!=
fieldcode2
)
{
if
(
texture
)
{
ITexture
*
texture
=
imageManager
.
GetTextureField
(
fieldcode1
);
drawField
=
true
;
if
(
texture
)
{
matManager
.
mTexture
.
setTexture
(
0
,
texture
);
drawField
=
true
;
driver
->
setMaterial
(
matManager
.
mTexture
);
matManager
.
mTexture
.
setTexture
(
0
,
texture
);
driver
->
drawVertexPrimitiveList
(
matManager
.
vFieldSpell1
,
4
,
matManager
.
iRectangle
,
2
);
driver
->
setMaterial
(
matManager
.
mTexture
);
}
driver
->
drawVertexPrimitiveList
(
matManager
.
vFieldSpell1
,
4
,
matManager
.
iRectangle
,
2
);
texture
=
imageManager
.
GetTextureField
(
fieldcode2
);
}
if
(
texture
)
{
texture
=
imageManager
.
GetTextureField
(
fieldcode2
);
drawField
=
true
;
if
(
texture
)
{
matManager
.
mTexture
.
setTexture
(
0
,
texture
);
drawField
=
true
;
driver
->
setMaterial
(
matManager
.
mTexture
);
matManager
.
mTexture
.
setTexture
(
0
,
texture
);
driver
->
drawVertexPrimitiveList
(
matManager
.
vFieldSpell2
,
4
,
matManager
.
iRectangle
,
2
);
driver
->
setMaterial
(
matManager
.
mTexture
);
}
driver
->
drawVertexPrimitiveList
(
matManager
.
vFieldSpell2
,
4
,
matManager
.
iRectangle
,
2
);
}
else
if
(
fieldcode
>
0
)
{
}
ITexture
*
texture
=
imageManager
.
GetTextureField
(
fieldcode
);
}
else
if
(
fieldcode
>
0
)
{
if
(
texture
)
{
ITexture
*
texture
=
imageManager
.
GetTextureField
(
fieldcode
);
drawField
=
true
;
if
(
texture
)
{
matManager
.
mTexture
.
setTexture
(
0
,
texture
);
drawField
=
true
;
driver
->
setMaterial
(
matManager
.
mTexture
);
matManager
.
mTexture
.
setTexture
(
0
,
texture
);
driver
->
drawVertexPrimitiveList
(
matManager
.
vFieldSpell
,
4
,
matManager
.
iRectangle
,
2
);
driver
->
setMaterial
(
matManager
.
mTexture
);
driver
->
drawVertexPrimitiveList
(
matManager
.
vFieldSpell
,
4
,
matManager
.
iRectangle
,
2
);
}
}
}
}
}
matManager
.
mTexture
.
setTexture
(
0
,
drawField
?
imageManager
.
tFieldTransparent
[
rule
]
:
imageManager
.
tField
[
rule
]);
matManager
.
mTexture
.
setTexture
(
0
,
drawField
?
imageManager
.
tFieldTransparent
[
rule
]
:
imageManager
.
tField
[
rule
]);
...
@@ -249,7 +250,6 @@ void Game::DrawCards() {
...
@@ -249,7 +250,6 @@ void Game::DrawCards() {
DrawCard
(
*
cit
);
DrawCard
(
*
cit
);
}
}
void
Game
::
DrawCard
(
ClientCard
*
pcard
)
{
void
Game
::
DrawCard
(
ClientCard
*
pcard
)
{
driver
->
setTransform
(
irr
::
video
::
ETS_WORLD
,
pcard
->
mTransform
);
if
(
pcard
->
aniFrame
)
{
if
(
pcard
->
aniFrame
)
{
if
(
pcard
->
is_moving
)
{
if
(
pcard
->
is_moving
)
{
pcard
->
curPos
+=
pcard
->
dPos
;
pcard
->
curPos
+=
pcard
->
dPos
;
...
@@ -267,16 +267,23 @@ void Game::DrawCard(ClientCard* pcard) {
...
@@ -267,16 +267,23 @@ void Game::DrawCard(ClientCard* pcard) {
}
}
matManager
.
mCard
.
AmbientColor
=
0xffffffff
;
matManager
.
mCard
.
AmbientColor
=
0xffffffff
;
matManager
.
mCard
.
DiffuseColor
=
(
pcard
->
curAlpha
<<
24
)
|
0xffffff
;
matManager
.
mCard
.
DiffuseColor
=
(
pcard
->
curAlpha
<<
24
)
|
0xffffff
;
matManager
.
mCard
.
setTexture
(
0
,
imageManager
.
GetTexture
(
pcard
->
code
));
driver
->
setTransform
(
irr
::
video
::
ETS_WORLD
,
pcard
->
mTransform
);
driver
->
setTransform
(
irr
::
video
::
ETS_WORLD
,
pcard
->
mTransform
);
driver
->
setMaterial
(
matManager
.
mCard
);
auto
m22
=
pcard
->
mTransform
(
2
,
2
);
driver
->
drawVertexPrimitiveList
(
matManager
.
vCardFront
,
4
,
matManager
.
iRectangle
,
2
);
if
(
m22
>
-
0.99
||
pcard
->
is_moving
)
{
if
(
pcard
->
controler
==
0
||
!
imageManager
.
tCover
[
1
])
matManager
.
mCard
.
setTexture
(
0
,
imageManager
.
GetTexture
(
pcard
->
code
));
matManager
.
mCard
.
setTexture
(
0
,
imageManager
.
tCover
[
0
]);
driver
->
setMaterial
(
matManager
.
mCard
);
else
driver
->
drawVertexPrimitiveList
(
matManager
.
vCardFront
,
4
,
matManager
.
iRectangle
,
2
);
matManager
.
mCard
.
setTexture
(
0
,
imageManager
.
tCover
[
1
]);
}
driver
->
setMaterial
(
matManager
.
mCard
);
if
(
m22
<
0.99
||
pcard
->
is_moving
)
{
driver
->
drawVertexPrimitiveList
(
matManager
.
vCardBack
,
4
,
matManager
.
iRectangle
,
2
);
matManager
.
mCard
.
setTexture
(
0
,
imageManager
.
tCover
[
pcard
->
controler
]);
driver
->
setMaterial
(
matManager
.
mCard
);
driver
->
drawVertexPrimitiveList
(
matManager
.
vCardBack
,
4
,
matManager
.
iRectangle
,
2
);
}
if
(
pcard
->
is_moving
)
return
;
irr
::
core
::
matrix4
im
;
im
.
setTranslation
(
pcard
->
curPos
);
driver
->
setTransform
(
irr
::
video
::
ETS_WORLD
,
im
);
if
(
pcard
->
is_showequip
)
{
if
(
pcard
->
is_showequip
)
{
matManager
.
mTexture
.
setTexture
(
0
,
imageManager
.
tEquip
);
matManager
.
mTexture
.
setTexture
(
0
,
imageManager
.
tEquip
);
driver
->
setMaterial
(
matManager
.
mTexture
);
driver
->
setMaterial
(
matManager
.
mTexture
);
...
@@ -285,6 +292,10 @@ void Game::DrawCard(ClientCard* pcard) {
...
@@ -285,6 +292,10 @@ void Game::DrawCard(ClientCard* pcard) {
matManager
.
mTexture
.
setTexture
(
0
,
imageManager
.
tTarget
);
matManager
.
mTexture
.
setTexture
(
0
,
imageManager
.
tTarget
);
driver
->
setMaterial
(
matManager
.
mTexture
);
driver
->
setMaterial
(
matManager
.
mTexture
);
driver
->
drawVertexPrimitiveList
(
matManager
.
vSymbol
,
4
,
matManager
.
iRectangle
,
2
);
driver
->
drawVertexPrimitiveList
(
matManager
.
vSymbol
,
4
,
matManager
.
iRectangle
,
2
);
}
else
if
(
pcard
->
is_showchaintarget
)
{
matManager
.
mTexture
.
setTexture
(
0
,
imageManager
.
tChainTarget
);
driver
->
setMaterial
(
matManager
.
mTexture
);
driver
->
drawVertexPrimitiveList
(
matManager
.
vSymbol
,
4
,
matManager
.
iRectangle
,
2
);
}
else
if
(
pcard
->
is_disabled
&&
(
pcard
->
location
&
LOCATION_ONFIELD
)
&&
(
pcard
->
position
&
POS_FACEUP
))
{
}
else
if
(
pcard
->
is_disabled
&&
(
pcard
->
location
&
LOCATION_ONFIELD
)
&&
(
pcard
->
position
&
POS_FACEUP
))
{
matManager
.
mTexture
.
setTexture
(
0
,
imageManager
.
tNegated
);
matManager
.
mTexture
.
setTexture
(
0
,
imageManager
.
tNegated
);
driver
->
setMaterial
(
matManager
.
mTexture
);
driver
->
setMaterial
(
matManager
.
mTexture
);
...
@@ -845,7 +856,7 @@ void Game::DrawSpec() {
...
@@ -845,7 +856,7 @@ void Game::DrawSpec() {
matk
.
setRotationRadians
(
atk_r
);
matk
.
setRotationRadians
(
atk_r
);
driver
->
setTransform
(
irr
::
video
::
ETS_WORLD
,
matk
);
driver
->
setTransform
(
irr
::
video
::
ETS_WORLD
,
matk
);
driver
->
setMaterial
(
matManager
.
mATK
);
driver
->
setMaterial
(
matManager
.
mATK
);
driver
->
drawVertexPrimitiveList
(
&
matManager
.
vArrow
[
attack_sv
],
40
,
matManager
.
iArrow
,
10
,
EVT_STANDARD
,
EPT_TRIANGLE_STRIP
);
driver
->
drawVertexPrimitiveList
(
&
matManager
.
vArrow
[
attack_sv
],
12
,
matManager
.
iArrow
,
10
,
EVT_STANDARD
,
EPT_TRIANGLE_STRIP
);
attack_sv
+=
4
;
attack_sv
+=
4
;
if
(
attack_sv
>
28
)
if
(
attack_sv
>
28
)
attack_sv
=
0
;
attack_sv
=
0
;
...
...
gframe/duelclient.cpp
View file @
03cc48c7
...
@@ -1160,7 +1160,8 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
...
@@ -1160,7 +1160,8 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
int
c
,
l
,
s
,
ss
;
int
c
,
l
,
s
,
ss
;
unsigned
int
code
;
unsigned
int
code
;
bool
panelmode
=
false
;
bool
panelmode
=
false
;
mainGame
->
dField
.
select_ready
=
false
;
bool
select_ready
=
mainGame
->
dField
.
select_min
==
0
;
mainGame
->
dField
.
select_ready
=
select_ready
;
ClientCard
*
pcard
;
ClientCard
*
pcard
;
for
(
int
i
=
0
;
i
<
count
;
++
i
)
{
for
(
int
i
=
0
;
i
<
count
;
++
i
)
{
code
=
(
unsigned
int
)
BufferIO
::
ReadInt32
(
pbuf
);
code
=
(
unsigned
int
)
BufferIO
::
ReadInt32
(
pbuf
);
...
@@ -1190,7 +1191,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
...
@@ -1190,7 +1191,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
if
(
panelmode
)
{
if
(
panelmode
)
{
mainGame
->
gMutex
.
Lock
();
mainGame
->
gMutex
.
Lock
();
mainGame
->
wCardSelect
->
setText
(
textBuffer
);
mainGame
->
wCardSelect
->
setText
(
textBuffer
);
mainGame
->
dField
.
ShowSelectCard
();
mainGame
->
dField
.
ShowSelectCard
(
select_ready
);
mainGame
->
gMutex
.
Unlock
();
mainGame
->
gMutex
.
Unlock
();
}
else
{
}
else
{
mainGame
->
stHintMsg
->
setText
(
textBuffer
);
mainGame
->
stHintMsg
->
setText
(
textBuffer
);
...
@@ -1198,6 +1199,8 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
...
@@ -1198,6 +1199,8 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
}
}
if
(
mainGame
->
dField
.
select_cancelable
)
{
if
(
mainGame
->
dField
.
select_cancelable
)
{
mainGame
->
dField
.
ShowCancelOrFinishButton
(
1
);
mainGame
->
dField
.
ShowCancelOrFinishButton
(
1
);
}
else
if
(
select_ready
)
{
mainGame
->
dField
.
ShowCancelOrFinishButton
(
2
);
}
else
{
}
else
{
mainGame
->
dField
.
ShowCancelOrFinishButton
(
0
);
mainGame
->
dField
.
ShowCancelOrFinishButton
(
0
);
}
}
...
@@ -1999,9 +2002,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
...
@@ -1999,9 +2002,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
mainGame
->
gMutex
.
Lock
();
mainGame
->
gMutex
.
Lock
();
mainGame
->
dField
.
AddCard
(
pcard
,
cc
,
cl
,
cs
);
mainGame
->
dField
.
AddCard
(
pcard
,
cc
,
cl
,
cs
);
mainGame
->
gMutex
.
Unlock
();
mainGame
->
gMutex
.
Unlock
();
mainGame
->
dField
.
GetCardLocation
(
pcard
,
&
pcard
->
curPos
,
&
pcard
->
curRot
);
mainGame
->
dField
.
GetCardLocation
(
pcard
,
&
pcard
->
curPos
,
&
pcard
->
curRot
,
true
);
pcard
->
mTransform
.
setTranslation
(
pcard
->
curPos
);
pcard
->
mTransform
.
setRotationRadians
(
pcard
->
curRot
);
pcard
->
curAlpha
=
5
;
pcard
->
curAlpha
=
5
;
mainGame
->
dField
.
FadeCard
(
pcard
,
255
,
20
);
mainGame
->
dField
.
FadeCard
(
pcard
,
255
,
20
);
mainGame
->
WaitFrameSignal
(
20
);
mainGame
->
WaitFrameSignal
(
20
);
...
@@ -2042,8 +2043,10 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
...
@@ -2042,8 +2043,10 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
pcard
->
equipTarget
=
0
;
pcard
->
equipTarget
=
0
;
}
}
}
}
pcard
->
is_hovered
=
false
;
pcard
->
is_showequip
=
false
;
pcard
->
is_showequip
=
false
;
pcard
->
is_showtarget
=
false
;
pcard
->
is_showtarget
=
false
;
pcard
->
is_showchaintarget
=
false
;
if
(
mainGame
->
dInfo
.
isReplay
&&
mainGame
->
dInfo
.
isReplaySkiping
)
{
if
(
mainGame
->
dInfo
.
isReplay
&&
mainGame
->
dInfo
.
isReplaySkiping
)
{
mainGame
->
dField
.
RemoveCard
(
pc
,
pl
,
ps
);
mainGame
->
dField
.
RemoveCard
(
pc
,
pl
,
ps
);
pcard
->
position
=
cp
;
pcard
->
position
=
cp
;
...
@@ -2094,6 +2097,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
...
@@ -2094,6 +2097,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
pcard
->
counters
.
clear
();
pcard
->
counters
.
clear
();
pcard
->
ClearTarget
();
pcard
->
ClearTarget
();
pcard
->
is_showtarget
=
false
;
pcard
->
is_showtarget
=
false
;
pcard
->
is_showchaintarget
=
false
;
ClientCard
*
olcard
=
mainGame
->
dField
.
GetCard
(
cc
,
cl
&
0x7f
,
cs
);
ClientCard
*
olcard
=
mainGame
->
dField
.
GetCard
(
cc
,
cl
&
0x7f
,
cs
);
if
(
mainGame
->
dInfo
.
isReplay
&&
mainGame
->
dInfo
.
isReplaySkiping
)
{
if
(
mainGame
->
dInfo
.
isReplay
&&
mainGame
->
dInfo
.
isReplaySkiping
)
{
mainGame
->
dField
.
RemoveCard
(
pc
,
pl
,
ps
);
mainGame
->
dField
.
RemoveCard
(
pc
,
pl
,
ps
);
...
@@ -2358,13 +2362,14 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
...
@@ -2358,13 +2362,14 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
mainGame
->
dField
.
current_chain
.
sequence
=
cs
;
mainGame
->
dField
.
current_chain
.
sequence
=
cs
;
mainGame
->
dField
.
GetChainLocation
(
cc
,
cl
,
cs
,
&
mainGame
->
dField
.
current_chain
.
chain_pos
);
mainGame
->
dField
.
GetChainLocation
(
cc
,
cl
,
cs
,
&
mainGame
->
dField
.
current_chain
.
chain_pos
);
mainGame
->
dField
.
current_chain
.
solved
=
false
;
mainGame
->
dField
.
current_chain
.
solved
=
false
;
mainGame
->
dField
.
current_chain
.
target
.
clear
();
int
chc
=
0
;
int
chc
=
0
;
for
(
size_t
i
=
0
;
i
<
mainGame
->
dField
.
chains
.
size
();
++
i
)
{
for
(
auto
chit
=
mainGame
->
dField
.
chains
.
begin
();
chit
!=
mainGame
->
dField
.
chains
.
end
();
++
chit
)
{
if
(
cl
==
0x10
||
cl
==
0x20
)
{
if
(
cl
==
0x10
||
cl
==
0x20
)
{
if
(
mainGame
->
dField
.
chains
[
i
].
controler
==
cc
&&
mainGame
->
dField
.
chains
[
i
].
location
==
cl
)
if
(
chit
->
controler
==
cc
&&
chit
->
location
==
cl
)
chc
++
;
chc
++
;
}
else
{
}
else
{
if
(
mainGame
->
dField
.
chains
[
i
].
controler
==
cc
&&
mainGame
->
dField
.
chains
[
i
].
location
==
cl
&&
mainGame
->
dField
.
chains
[
i
].
sequence
==
cs
)
if
(
chit
->
controler
==
cc
&&
chit
->
location
==
cl
&&
chit
->
sequence
==
cs
)
chc
++
;
chc
++
;
}
}
}
}
...
@@ -2457,14 +2462,14 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
...
@@ -2457,14 +2462,14 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
pbuf
+=
count
*
4
;
pbuf
+=
count
*
4
;
return
true
;
return
true
;
}
}
ClientCard
*
pcard
;
for
(
int
i
=
0
;
i
<
count
;
++
i
)
{
for
(
int
i
=
0
;
i
<
count
;
++
i
)
{
int
c
=
mainGame
->
LocalPlayer
(
BufferIO
::
ReadInt8
(
pbuf
));
int
c
=
mainGame
->
LocalPlayer
(
BufferIO
::
ReadInt8
(
pbuf
));
int
l
=
BufferIO
::
ReadInt8
(
pbuf
);
int
l
=
BufferIO
::
ReadInt8
(
pbuf
);
int
s
=
BufferIO
::
ReadInt8
(
pbuf
);
int
s
=
BufferIO
::
ReadInt8
(
pbuf
);
/*int ss = */
BufferIO
::
ReadInt8
(
pbuf
);
/*int ss = */
BufferIO
::
ReadInt8
(
pbuf
);
pcard
=
mainGame
->
dField
.
GetCard
(
c
,
l
,
s
);
ClientCard
*
pcard
=
mainGame
->
dField
.
GetCard
(
c
,
l
,
s
);
pcard
->
is_highlighting
=
true
;
pcard
->
is_highlighting
=
true
;
mainGame
->
dField
.
current_chain
.
target
.
insert
(
pcard
);
if
(
pcard
->
location
&
LOCATION_ONFIELD
)
{
if
(
pcard
->
location
&
LOCATION_ONFIELD
)
{
for
(
int
j
=
0
;
j
<
3
;
++
j
)
{
for
(
int
j
=
0
;
j
<
3
;
++
j
)
{
mainGame
->
dField
.
FadeCard
(
pcard
,
5
,
5
);
mainGame
->
dField
.
FadeCard
(
pcard
,
5
,
5
);
...
@@ -3309,12 +3314,12 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
...
@@ -3309,12 +3314,12 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
mainGame
->
dField
.
GetChainLocation
(
cc
,
cl
,
cs
,
&
mainGame
->
dField
.
current_chain
.
chain_pos
);
mainGame
->
dField
.
GetChainLocation
(
cc
,
cl
,
cs
,
&
mainGame
->
dField
.
current_chain
.
chain_pos
);
mainGame
->
dField
.
current_chain
.
solved
=
false
;
mainGame
->
dField
.
current_chain
.
solved
=
false
;
int
chc
=
0
;
int
chc
=
0
;
for
(
size_t
i
=
0
;
i
<
mainGame
->
dField
.
chains
.
size
();
++
i
)
{
for
(
auto
chit
=
mainGame
->
dField
.
chains
.
begin
();
chit
!=
mainGame
->
dField
.
chains
.
end
();
++
chit
)
{
if
(
cl
==
0x10
||
cl
==
0x20
)
{
if
(
cl
==
0x10
||
cl
==
0x20
)
{
if
(
mainGame
->
dField
.
chains
[
i
].
controler
==
cc
&&
mainGame
->
dField
.
chains
[
i
].
location
==
cl
)
if
(
chit
->
controler
==
cc
&&
chit
->
location
==
cl
)
chc
++
;
chc
++
;
}
else
{
}
else
{
if
(
mainGame
->
dField
.
chains
[
i
].
controler
==
cc
&&
mainGame
->
dField
.
chains
[
i
].
location
==
cl
&&
mainGame
->
dField
.
chains
[
i
].
sequence
==
cs
)
if
(
chit
->
controler
==
cc
&&
chit
->
location
==
cl
&&
chit
->
sequence
==
cs
)
chc
++
;
chc
++
;
}
}
}
}
...
...
gframe/event_handler.cpp
View file @
03cc48c7
...
@@ -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
{
...
@@ -204,7 +204,6 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
...
@@ -204,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
();
...
@@ -1570,7 +1569,6 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
...
@@ -1570,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
();
...
@@ -1697,7 +1695,6 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
...
@@ -1697,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
)
...
@@ -1717,17 +1714,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
...
@@ -1717,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
)
...
@@ -1738,14 +1725,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
...
@@ -1738,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
)
{
...
@@ -2299,6 +2279,24 @@ void ClientField::ShowCancelOrFinishButton(int buttonOp) {
...
@@ -2299,6 +2279,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 @
03cc48c7
...
@@ -46,8 +46,6 @@ bool Game::Initialize() {
...
@@ -46,8 +46,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
);
...
@@ -737,12 +735,16 @@ void Game::InitStaticText(irr::gui::IGUIStaticText* pControl, u32 cWidth, u32 cH
...
@@ -737,12 +735,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
;
...
@@ -750,11 +752,12 @@ void Game::SetStaticText(irr::gui::IGUIStaticText* pControl, u32 cWidth, irr::gu
...
@@ -750,11 +752,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
);
...
@@ -1223,6 +1226,7 @@ void Game::CloseDuelWindow() {
...
@@ -1223,6 +1226,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/image_manager.cpp
View file @
03cc48c7
...
@@ -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 @
03cc48c7
...
@@ -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
];
...
...
lflist.conf
View file @
03cc48c7
#[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
--イレカエル
...
...
textures/chaintarget.png
0 → 100644
View file @
03cc48c7
4.5 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