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
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() {
is_selected
=
false
;
is_showequip
=
false
;
is_showtarget
=
false
;
is_showchaintarget
=
false
;
is_highlighting
=
false
;
is_disabled
=
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
class
ClientCard
{
public:
irr
::
video
::
ITexture
*
curTexture
;
irr
::
core
::
matrix4
mTransform
;
irr
::
core
::
vector3df
curPos
;
irr
::
core
::
vector3df
curRot
;
...
...
@@ -63,6 +62,7 @@ public:
bool
is_selected
;
bool
is_showequip
;
bool
is_showtarget
;
bool
is_showchaintarget
;
bool
is_highlighting
;
bool
is_reversed
;
u32
code
;
...
...
gframe/client_field.cpp
View file @
03cc48c7
...
...
@@ -93,9 +93,7 @@ void ClientField::Initial(int player, int deckc, int extrac) {
pcard
->
location
=
0x1
;
pcard
->
sequence
=
i
;
pcard
->
position
=
POS_FACEDOWN_DEFENSE
;
GetCardLocation
(
pcard
,
&
pcard
->
curPos
,
&
pcard
->
curRot
);
pcard
->
mTransform
.
setTranslation
(
pcard
->
curPos
);
pcard
->
mTransform
.
setRotationRadians
(
pcard
->
curRot
);
GetCardLocation
(
pcard
,
&
pcard
->
curPos
,
&
pcard
->
curRot
,
true
);
}
for
(
int
i
=
0
;
i
<
extrac
;
++
i
)
{
pcard
=
new
ClientCard
;
...
...
@@ -105,9 +103,7 @@ void ClientField::Initial(int player, int deckc, int extrac) {
pcard
->
location
=
0x40
;
pcard
->
sequence
=
i
;
pcard
->
position
=
POS_FACEDOWN_DEFENSE
;
GetCardLocation
(
pcard
,
&
pcard
->
curPos
,
&
pcard
->
curRot
);
pcard
->
mTransform
.
setTranslation
(
pcard
->
curPos
);
pcard
->
mTransform
.
setRotationRadians
(
pcard
->
curRot
);
GetCardLocation
(
pcard
,
&
pcard
->
curPos
,
&
pcard
->
curRot
,
true
);
}
}
ClientCard
*
ClientField
::
GetCard
(
int
controler
,
int
location
,
int
sequence
,
int
sub_seq
)
{
...
...
@@ -446,9 +442,7 @@ void ClientField::ShowSelectCard(bool buttonok, bool chain) {
mainGame
->
scrCardList
->
setMax
((
selectable_cards
.
size
()
-
5
)
*
10
+
9
);
mainGame
->
scrCardList
->
setPos
(
0
);
}
if
(
buttonok
)
mainGame
->
btnSelectOK
->
setVisible
(
true
);
else
mainGame
->
btnSelectOK
->
setVisible
(
false
);
mainGame
->
btnSelectOK
->
setVisible
(
buttonok
);
mainGame
->
PopupElement
(
mainGame
->
wCardSelect
);
}
void
ClientField
::
ShowChainCard
()
{
...
...
@@ -584,63 +578,47 @@ void ClientField::ReplaySwap() {
for
(
int
p
=
0
;
p
<
2
;
++
p
)
{
for
(
auto
cit
=
deck
[
p
].
begin
();
cit
!=
deck
[
p
].
end
();
++
cit
)
{
(
*
cit
)
->
controler
=
1
-
(
*
cit
)
->
controler
;
GetCardLocation
(
*
cit
,
&
(
*
cit
)
->
curPos
,
&
(
*
cit
)
->
curRot
);
(
*
cit
)
->
mTransform
.
setTranslation
((
*
cit
)
->
curPos
);
(
*
cit
)
->
mTransform
.
setRotationRadians
((
*
cit
)
->
curRot
);
GetCardLocation
(
*
cit
,
&
(
*
cit
)
->
curPos
,
&
(
*
cit
)
->
curRot
,
true
);
(
*
cit
)
->
is_moving
=
false
;
}
for
(
auto
cit
=
hand
[
p
].
begin
();
cit
!=
hand
[
p
].
end
();
++
cit
)
{
(
*
cit
)
->
controler
=
1
-
(
*
cit
)
->
controler
;
GetCardLocation
(
*
cit
,
&
(
*
cit
)
->
curPos
,
&
(
*
cit
)
->
curRot
);
(
*
cit
)
->
mTransform
.
setTranslation
((
*
cit
)
->
curPos
);
(
*
cit
)
->
mTransform
.
setRotationRadians
((
*
cit
)
->
curRot
);
GetCardLocation
(
*
cit
,
&
(
*
cit
)
->
curPos
,
&
(
*
cit
)
->
curRot
,
true
);
(
*
cit
)
->
is_moving
=
false
;
}
for
(
auto
cit
=
mzone
[
p
].
begin
();
cit
!=
mzone
[
p
].
end
();
++
cit
)
{
if
(
*
cit
)
{
(
*
cit
)
->
controler
=
1
-
(
*
cit
)
->
controler
;
GetCardLocation
(
*
cit
,
&
(
*
cit
)
->
curPos
,
&
(
*
cit
)
->
curRot
);
(
*
cit
)
->
mTransform
.
setTranslation
((
*
cit
)
->
curPos
);
(
*
cit
)
->
mTransform
.
setRotationRadians
((
*
cit
)
->
curRot
);
GetCardLocation
(
*
cit
,
&
(
*
cit
)
->
curPos
,
&
(
*
cit
)
->
curRot
,
true
);
(
*
cit
)
->
is_moving
=
false
;
}
}
for
(
auto
cit
=
szone
[
p
].
begin
();
cit
!=
szone
[
p
].
end
();
++
cit
)
{
if
(
*
cit
)
{
(
*
cit
)
->
controler
=
1
-
(
*
cit
)
->
controler
;
GetCardLocation
(
*
cit
,
&
(
*
cit
)
->
curPos
,
&
(
*
cit
)
->
curRot
);
(
*
cit
)
->
mTransform
.
setTranslation
((
*
cit
)
->
curPos
);
(
*
cit
)
->
mTransform
.
setRotationRadians
((
*
cit
)
->
curRot
);
GetCardLocation
(
*
cit
,
&
(
*
cit
)
->
curPos
,
&
(
*
cit
)
->
curRot
,
true
);
(
*
cit
)
->
is_moving
=
false
;
}
}
for
(
auto
cit
=
grave
[
p
].
begin
();
cit
!=
grave
[
p
].
end
();
++
cit
)
{
(
*
cit
)
->
controler
=
1
-
(
*
cit
)
->
controler
;
GetCardLocation
(
*
cit
,
&
(
*
cit
)
->
curPos
,
&
(
*
cit
)
->
curRot
);
(
*
cit
)
->
mTransform
.
setTranslation
((
*
cit
)
->
curPos
);
(
*
cit
)
->
mTransform
.
setRotationRadians
((
*
cit
)
->
curRot
);
GetCardLocation
(
*
cit
,
&
(
*
cit
)
->
curPos
,
&
(
*
cit
)
->
curRot
,
true
);
(
*
cit
)
->
is_moving
=
false
;
}
for
(
auto
cit
=
remove
[
p
].
begin
();
cit
!=
remove
[
p
].
end
();
++
cit
)
{
(
*
cit
)
->
controler
=
1
-
(
*
cit
)
->
controler
;
GetCardLocation
(
*
cit
,
&
(
*
cit
)
->
curPos
,
&
(
*
cit
)
->
curRot
);
(
*
cit
)
->
mTransform
.
setTranslation
((
*
cit
)
->
curPos
);
(
*
cit
)
->
mTransform
.
setRotationRadians
((
*
cit
)
->
curRot
);
GetCardLocation
(
*
cit
,
&
(
*
cit
)
->
curPos
,
&
(
*
cit
)
->
curRot
,
true
);
(
*
cit
)
->
is_moving
=
false
;
}
for
(
auto
cit
=
extra
[
p
].
begin
();
cit
!=
extra
[
p
].
end
();
++
cit
)
{
(
*
cit
)
->
controler
=
1
-
(
*
cit
)
->
controler
;
GetCardLocation
(
*
cit
,
&
(
*
cit
)
->
curPos
,
&
(
*
cit
)
->
curRot
);
(
*
cit
)
->
mTransform
.
setTranslation
((
*
cit
)
->
curPos
);
(
*
cit
)
->
mTransform
.
setRotationRadians
((
*
cit
)
->
curRot
);
GetCardLocation
(
*
cit
,
&
(
*
cit
)
->
curPos
,
&
(
*
cit
)
->
curRot
,
true
);
(
*
cit
)
->
is_moving
=
false
;
}
}
for
(
auto
cit
=
overlay_cards
.
begin
();
cit
!=
overlay_cards
.
end
();
++
cit
)
{
(
*
cit
)
->
controler
=
1
-
(
*
cit
)
->
controler
;
GetCardLocation
(
*
cit
,
&
(
*
cit
)
->
curPos
,
&
(
*
cit
)
->
curRot
);
(
*
cit
)
->
mTransform
.
setTranslation
((
*
cit
)
->
curPos
);
(
*
cit
)
->
mTransform
.
setRotationRadians
((
*
cit
)
->
curRot
);
GetCardLocation
(
*
cit
,
&
(
*
cit
)
->
curPos
,
&
(
*
cit
)
->
curRot
,
true
);
(
*
cit
)
->
is_moving
=
false
;
}
mainGame
->
dInfo
.
isFirst
=
!
mainGame
->
dInfo
.
isFirst
;
...
...
@@ -658,56 +636,40 @@ void ClientField::ReplaySwap() {
void
ClientField
::
RefreshAllCards
()
{
for
(
int
p
=
0
;
p
<
2
;
++
p
)
{
for
(
auto
cit
=
deck
[
p
].
begin
();
cit
!=
deck
[
p
].
end
();
++
cit
)
{
GetCardLocation
(
*
cit
,
&
(
*
cit
)
->
curPos
,
&
(
*
cit
)
->
curRot
);
(
*
cit
)
->
mTransform
.
setTranslation
((
*
cit
)
->
curPos
);
(
*
cit
)
->
mTransform
.
setRotationRadians
((
*
cit
)
->
curRot
);
GetCardLocation
(
*
cit
,
&
(
*
cit
)
->
curPos
,
&
(
*
cit
)
->
curRot
,
true
);
(
*
cit
)
->
is_moving
=
false
;
}
for
(
auto
cit
=
hand
[
p
].
begin
();
cit
!=
hand
[
p
].
end
();
++
cit
)
{
GetCardLocation
(
*
cit
,
&
(
*
cit
)
->
curPos
,
&
(
*
cit
)
->
curRot
);
(
*
cit
)
->
mTransform
.
setTranslation
((
*
cit
)
->
curPos
);
(
*
cit
)
->
mTransform
.
setRotationRadians
((
*
cit
)
->
curRot
);
GetCardLocation
(
*
cit
,
&
(
*
cit
)
->
curPos
,
&
(
*
cit
)
->
curRot
,
true
);
(
*
cit
)
->
is_moving
=
false
;
}
for
(
auto
cit
=
mzone
[
p
].
begin
();
cit
!=
mzone
[
p
].
end
();
++
cit
)
{
if
(
*
cit
)
{
GetCardLocation
(
*
cit
,
&
(
*
cit
)
->
curPos
,
&
(
*
cit
)
->
curRot
);
(
*
cit
)
->
mTransform
.
setTranslation
((
*
cit
)
->
curPos
);
(
*
cit
)
->
mTransform
.
setRotationRadians
((
*
cit
)
->
curRot
);
GetCardLocation
(
*
cit
,
&
(
*
cit
)
->
curPos
,
&
(
*
cit
)
->
curRot
,
true
);
(
*
cit
)
->
is_moving
=
false
;
}
}
for
(
auto
cit
=
szone
[
p
].
begin
();
cit
!=
szone
[
p
].
end
();
++
cit
)
{
if
(
*
cit
)
{
GetCardLocation
(
*
cit
,
&
(
*
cit
)
->
curPos
,
&
(
*
cit
)
->
curRot
);
(
*
cit
)
->
mTransform
.
setTranslation
((
*
cit
)
->
curPos
);
(
*
cit
)
->
mTransform
.
setRotationRadians
((
*
cit
)
->
curRot
);
GetCardLocation
(
*
cit
,
&
(
*
cit
)
->
curPos
,
&
(
*
cit
)
->
curRot
,
true
);
(
*
cit
)
->
is_moving
=
false
;
}
}
for
(
auto
cit
=
grave
[
p
].
begin
();
cit
!=
grave
[
p
].
end
();
++
cit
)
{
GetCardLocation
(
*
cit
,
&
(
*
cit
)
->
curPos
,
&
(
*
cit
)
->
curRot
);
(
*
cit
)
->
mTransform
.
setTranslation
((
*
cit
)
->
curPos
);
(
*
cit
)
->
mTransform
.
setRotationRadians
((
*
cit
)
->
curRot
);
GetCardLocation
(
*
cit
,
&
(
*
cit
)
->
curPos
,
&
(
*
cit
)
->
curRot
,
true
);
(
*
cit
)
->
is_moving
=
false
;
}
for
(
auto
cit
=
remove
[
p
].
begin
();
cit
!=
remove
[
p
].
end
();
++
cit
)
{
GetCardLocation
(
*
cit
,
&
(
*
cit
)
->
curPos
,
&
(
*
cit
)
->
curRot
);
(
*
cit
)
->
mTransform
.
setTranslation
((
*
cit
)
->
curPos
);
(
*
cit
)
->
mTransform
.
setRotationRadians
((
*
cit
)
->
curRot
);
GetCardLocation
(
*
cit
,
&
(
*
cit
)
->
curPos
,
&
(
*
cit
)
->
curRot
,
true
);
(
*
cit
)
->
is_moving
=
false
;
}
for
(
auto
cit
=
extra
[
p
].
begin
();
cit
!=
extra
[
p
].
end
();
++
cit
)
{
GetCardLocation
(
*
cit
,
&
(
*
cit
)
->
curPos
,
&
(
*
cit
)
->
curRot
);
(
*
cit
)
->
mTransform
.
setTranslation
((
*
cit
)
->
curPos
);
(
*
cit
)
->
mTransform
.
setRotationRadians
((
*
cit
)
->
curRot
);
GetCardLocation
(
*
cit
,
&
(
*
cit
)
->
curPos
,
&
(
*
cit
)
->
curRot
,
true
);
(
*
cit
)
->
is_moving
=
false
;
}
}
for
(
auto
cit
=
overlay_cards
.
begin
();
cit
!=
overlay_cards
.
end
();
++
cit
)
{
GetCardLocation
(
*
cit
,
&
(
*
cit
)
->
curPos
,
&
(
*
cit
)
->
curRot
);
(
*
cit
)
->
mTransform
.
setTranslation
((
*
cit
)
->
curPos
);
(
*
cit
)
->
mTransform
.
setRotationRadians
((
*
cit
)
->
curRot
);
GetCardLocation
(
*
cit
,
&
(
*
cit
)
->
curPos
,
&
(
*
cit
)
->
curRot
,
true
);
(
*
cit
)
->
is_moving
=
false
;
}
}
...
...
gframe/client_field.h
View file @
03cc48c7
...
...
@@ -3,12 +3,13 @@
#include "config.h"
#include <vector>
#include <set>
namespace
ygo
{
class
ClientCard
;
struct
ChainInfo
{
struct
ChainInfo
{
irr
::
core
::
vector3df
chain_pos
;
ClientCard
*
chain_card
;
int
code
;
...
...
@@ -17,6 +18,7 @@ struct ChainInfo{
int
location
;
int
sequence
;
bool
solved
;
std
::
set
<
ClientCard
*>
target
;
};
class
ClientField
:
public
irr
::
IEventReceiver
{
...
...
@@ -79,7 +81,7 @@ public:
bool
last_chain
;
bool
deck_reversed
;
bool
conti_selecting
;
ClientField
();
void
Clear
();
void
Initial
(
int
player
,
int
deckc
,
int
extrac
);
...
...
@@ -96,7 +98,7 @@ public:
void
ShowLocationCard
();
void
ReplaySwap
();
void
RefreshAllCards
();
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
MoveCard
(
ClientCard
*
pcard
,
int
frame
);
...
...
@@ -132,6 +134,7 @@ public:
void
ShowMenu
(
int
flag
,
int
x
,
int
y
);
void
UpdateChainButtons
();
void
ShowCancelOrFinishButton
(
int
buttonOp
);
void
SetShowMark
(
ClientCard
*
pcard
,
bool
enable
);
void
SetResponseSelectedCards
()
const
;
};
...
...
gframe/config.h
View file @
03cc48c7
...
...
@@ -4,7 +4,7 @@
#pragma once
#define _IRR_STATIC_LIB_
#define
_
IRR_COMPILE_WITH_DX9_DEV_PACK
#define IRR_COMPILE_WITH_DX9_DEV_PACK
#ifdef _WIN32
#include <WinSock2.h>
...
...
gframe/data_manager.cpp
View file @
03cc48c7
...
...
@@ -89,28 +89,20 @@ bool DataManager::LoadStrings(const char* file) {
sscanf
(
linebuf
,
"!%s"
,
strbuf
);
if
(
!
strcmp
(
strbuf
,
"system"
))
{
sscanf
(
&
linebuf
[
7
],
"%d %240[^
\n
]"
,
&
value
,
strbuf
);
int
len
=
BufferIO
::
DecodeUTF8
(
strbuf
,
strBuffer
);
wchar_t
*
pbuf
=
new
wchar_t
[
len
+
1
];
wcscpy
(
pbuf
,
strBuffer
);
_sysStrings
[
value
]
=
pbuf
;
BufferIO
::
DecodeUTF8
(
strbuf
,
strBuffer
);
_sysStrings
[
value
]
=
strBuffer
;
}
else
if
(
!
strcmp
(
strbuf
,
"victory"
))
{
sscanf
(
&
linebuf
[
8
],
"%x %240[^
\n
]"
,
&
value
,
strbuf
);
int
len
=
BufferIO
::
DecodeUTF8
(
strbuf
,
strBuffer
);
wchar_t
*
pbuf
=
new
wchar_t
[
len
+
1
];
wcscpy
(
pbuf
,
strBuffer
);
_victoryStrings
[
value
]
=
pbuf
;
BufferIO
::
DecodeUTF8
(
strbuf
,
strBuffer
);
_victoryStrings
[
value
]
=
strBuffer
;
}
else
if
(
!
strcmp
(
strbuf
,
"counter"
))
{
sscanf
(
&
linebuf
[
8
],
"%x %240[^
\n
]"
,
&
value
,
strbuf
);
int
len
=
BufferIO
::
DecodeUTF8
(
strbuf
,
strBuffer
);
wchar_t
*
pbuf
=
new
wchar_t
[
len
+
1
];
wcscpy
(
pbuf
,
strBuffer
);
_counterStrings
[
value
]
=
pbuf
;
BufferIO
::
DecodeUTF8
(
strbuf
,
strBuffer
);
_counterStrings
[
value
]
=
strBuffer
;
}
else
if
(
!
strcmp
(
strbuf
,
"setname"
))
{
sscanf
(
&
linebuf
[
8
],
"%x %240[^
\t\n
]"
,
&
value
,
strbuf
);
//using tab for comment
int
len
=
BufferIO
::
DecodeUTF8
(
strbuf
,
strBuffer
);
wchar_t
*
pbuf
=
new
wchar_t
[
len
+
1
];
wcscpy
(
pbuf
,
strBuffer
);
_setnameStrings
[
value
]
=
pbuf
;
BufferIO
::
DecodeUTF8
(
strbuf
,
strBuffer
);
_setnameStrings
[
value
]
=
strBuffer
;
}
}
fclose
(
fp
);
...
...
@@ -175,33 +167,35 @@ const wchar_t* DataManager::GetDesc(int strCode) {
return
unknown_string
;
}
const
wchar_t
*
DataManager
::
GetSysString
(
int
code
)
{
if
(
code
<
0
||
code
>=
2048
||
_sysStrings
[
code
]
==
0
)
if
(
code
<
0
||
code
>=
2048
)
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
)
{
auto
csit
=
_victoryStrings
.
find
(
code
);
if
(
csit
==
_victoryStrings
.
end
())
return
unknown_string
;
return
csit
->
second
;
return
csit
->
second
.
c_str
()
;
}
const
wchar_t
*
DataManager
::
GetCounterName
(
int
code
)
{
auto
csit
=
_counterStrings
.
find
(
code
);
if
(
csit
==
_counterStrings
.
end
())
return
unknown_string
;
return
csit
->
second
;
return
csit
->
second
.
c_str
()
;
}
const
wchar_t
*
DataManager
::
GetSetName
(
int
code
)
{
auto
csit
=
_setnameStrings
.
find
(
code
);
if
(
csit
==
_setnameStrings
.
end
())
return
NULL
;
return
csit
->
second
;
return
csit
->
second
.
c_str
()
;
}
unsigned
int
DataManager
::
GetSetCode
(
const
wchar_t
*
setname
)
{
wchar_t
strbuff
[
256
];
for
(
auto
csit
=
_setnameStrings
.
begin
();
csit
!=
_setnameStrings
.
end
();
++
csit
)
{
swscanf
(
csit
->
second
,
L"%[^|]"
,
strbuff
);
//setname|extra info
if
(
wcscmp
(
strbuff
,
setname
)
==
0
)
auto
xpos
=
csit
->
second
.
find_first_of
(
L'|'
);
//setname|extra info
if
(
csit
->
second
.
compare
(
0
,
xpos
,
setname
)
==
0
)
return
csit
->
first
;
}
return
0
;
...
...
gframe/data_manager.h
View file @
03cc48c7
...
...
@@ -35,11 +35,11 @@ public:
std
::
unordered_map
<
unsigned
int
,
CardDataC
>
_datas
;
std
::
unordered_map
<
unsigned
int
,
CardString
>
_strings
;
std
::
unordered_map
<
unsigned
int
,
wchar_t
*>
_counterStrings
;
std
::
unordered_map
<
unsigned
int
,
wchar_t
*>
_victoryStrings
;
std
::
unordered_map
<
unsigned
int
,
wchar_t
*>
_setnameStrings
;
std
::
unordered_map
<
unsigned
int
,
std
::
wstring
>
_counterStrings
;
std
::
unordered_map
<
unsigned
int
,
std
::
wstring
>
_victoryStrings
;
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
numBuffer
[
6
];
wchar_t
attBuffer
[
128
];
...
...
@@ -51,7 +51,7 @@ public:
static
wchar_t
strBuffer
[
4096
];
static
const
wchar_t
*
unknown_string
;
static
int
CardReader
(
int
,
void
*
);
};
extern
DataManager
dataManager
;
...
...
gframe/drawing.cpp
View file @
03cc48c7
...
...
@@ -24,6 +24,7 @@ void Game::DrawSelectionLine(irr::video::S3DVertex* vec, bool strip, int width,
glEnd
();
glMaterialfv
(
GL_FRONT
,
GL_AMBIENT
,
origin
);
glDisable
(
GL_LINE_STIPPLE
);
glEnable
(
GL_TEXTURE_2D
);
}
else
{
driver
->
setMaterial
(
matManager
.
mOutLine
);
if
(
strip
)
{
...
...
@@ -49,9 +50,9 @@ void Game::DrawSelectionLine(irr::video::S3DVertex* vec, bool strip, int width,
void
Game
::
DrawBackGround
()
{
static
int
selFieldAlpha
=
255
;
static
int
selFieldDAlpha
=
-
10
;
matrix4
im
=
irr
::
core
::
IdentityMatrix
;
im
.
setTranslation
(
vector3df
(
0
,
0
,
-
0.01
f
));
driver
->
setTransform
(
irr
::
video
::
ETS_WORLD
,
im
);
//
matrix4 im = irr::core::IdentityMatrix;
//
im.setTranslation(vector3df(0, 0, -0.01f));
//
driver->setTransform(irr::video::ETS_WORLD, im);
//dark shade
// matManager.mSelField.AmbientColor = 0xff000000;
// matManager.mSelField.DiffuseColor = 0xa0000000;
...
...
@@ -64,39 +65,39 @@ void Game::DrawBackGround() {
//draw field
//draw field spell card
driver
->
setTransform
(
irr
::
video
::
ETS_WORLD
,
irr
::
core
::
IdentityMatrix
);
int
fieldcode1
=
-
1
;
int
fieldcode2
=
-
1
;
bool
drawField
=
false
;
int
rule
=
(
dInfo
.
duel_rule
>=
4
)
?
1
:
0
;
if
(
mainGame
->
gameConf
.
draw_field_spell
&&
mainGame
->
dField
.
szone
[
0
][
5
]
&&
mainGame
->
dField
.
szone
[
0
][
5
]
->
position
&
POS_FACEUP
)
fieldcode1
=
mainGame
->
dField
.
szone
[
0
][
5
]
->
code
;
if
(
mainGame
->
gameConf
.
draw_field_spell
&&
mainGame
->
dField
.
szone
[
1
][
5
]
&&
mainGame
->
dField
.
szone
[
1
][
5
]
->
position
&
POS_FACEUP
)
fieldcode2
=
mainGame
->
dField
.
szone
[
1
][
5
]
->
code
;
int
fieldcode
=
(
fieldcode1
>
0
)
?
fieldcode1
:
fieldcode2
;
if
(
fieldcode1
>
0
&&
fieldcode2
>
0
&&
fieldcode1
!=
fieldcode2
)
{
ITexture
*
texture
=
imageManager
.
GetTextureField
(
fieldcode1
);
if
(
texture
)
{
drawField
=
true
;
matManager
.
mTexture
.
setTexture
(
0
,
texture
);
driver
->
setMaterial
(
matManager
.
mTexture
);
driver
->
drawVertexPrimitiveList
(
matManager
.
vFieldSpell1
,
4
,
matManager
.
iRectangle
,
2
);
}
texture
=
imageManager
.
GetTextureField
(
fieldcode2
);
if
(
texture
)
{
drawField
=
true
;
matManager
.
mTexture
.
setTexture
(
0
,
texture
);
driver
->
setMaterial
(
matManager
.
mTexture
);
driver
->
drawVertexPrimitiveList
(
matManager
.
vFieldSpell2
,
4
,
matManager
.
iRectangle
,
2
);
}
}
else
if
(
fieldcode
>
0
)
{
ITexture
*
texture
=
imageManager
.
GetTextureField
(
fieldcode
);
if
(
texture
)
{
drawField
=
true
;
matManager
.
mTexture
.
setTexture
(
0
,
texture
);
driver
->
setMaterial
(
matManager
.
mTexture
);
driver
->
drawVertexPrimitiveList
(
matManager
.
vFieldSpell
,
4
,
matManager
.
iRectangle
,
2
);
if
(
mainGame
->
gameConf
.
draw_field_spell
)
{
int
fieldcode1
=
-
1
;
int
fieldcode2
=
-
1
;
if
(
mainGame
->
dField
.
szone
[
0
][
5
]
&&
mainGame
->
dField
.
szone
[
0
][
5
]
->
position
&
POS_FACEUP
)
fieldcode1
=
mainGame
->
dField
.
szone
[
0
][
5
]
->
code
;
if
(
mainGame
->
dField
.
szone
[
1
][
5
]
&&
mainGame
->
dField
.
szone
[
1
][
5
]
->
position
&
POS_FACEUP
)
fieldcode2
=
mainGame
->
dField
.
szone
[
1
][
5
]
->
code
;
int
fieldcode
=
(
fieldcode1
>
0
)
?
fieldcode1
:
fieldcode2
;
if
(
fieldcode1
>
0
&&
fieldcode2
>
0
&&
fieldcode1
!=
fieldcode2
)
{
ITexture
*
texture
=
imageManager
.
GetTextureField
(
fieldcode1
);
if
(
texture
)
{
drawField
=
true
;
matManager
.
mTexture
.
setTexture
(
0
,
texture
);
driver
->
setMaterial
(
matManager
.
mTexture
);
driver
->
drawVertexPrimitiveList
(
matManager
.
vFieldSpell1
,
4
,
matManager
.
iRectangle
,
2
);
}
texture
=
imageManager
.
GetTextureField
(
fieldcode2
);
if
(
texture
)
{
drawField
=
true
;
matManager
.
mTexture
.
setTexture
(
0
,
texture
);
driver
->
setMaterial
(
matManager
.
mTexture
);
driver
->
drawVertexPrimitiveList
(
matManager
.
vFieldSpell2
,
4
,
matManager
.
iRectangle
,
2
);
}
}
else
if
(
fieldcode
>
0
)
{
ITexture
*
texture
=
imageManager
.
GetTextureField
(
fieldcode
);
if
(
texture
)
{
drawField
=
true
;
matManager
.
mTexture
.
setTexture
(
0
,
texture
);
driver
->
setMaterial
(
matManager
.
mTexture
);
driver
->
drawVertexPrimitiveList
(
matManager
.
vFieldSpell
,
4
,
matManager
.
iRectangle
,
2
);
}
}
}
matManager
.
mTexture
.
setTexture
(
0
,
drawField
?
imageManager
.
tFieldTransparent
[
rule
]
:
imageManager
.
tField
[
rule
]);
...
...
@@ -249,7 +250,6 @@ void Game::DrawCards() {
DrawCard
(
*
cit
);
}
void
Game
::
DrawCard
(
ClientCard
*
pcard
)
{
driver
->
setTransform
(
irr
::
video
::
ETS_WORLD
,
pcard
->
mTransform
);
if
(
pcard
->
aniFrame
)
{
if
(
pcard
->
is_moving
)
{
pcard
->
curPos
+=
pcard
->
dPos
;
...
...
@@ -267,16 +267,23 @@ void Game::DrawCard(ClientCard* pcard) {
}
matManager
.
mCard
.
AmbientColor
=
0xffffffff
;
matManager
.
mCard
.
DiffuseColor
=
(
pcard
->
curAlpha
<<
24
)
|
0xffffff
;
matManager
.
mCard
.
setTexture
(
0
,
imageManager
.
GetTexture
(
pcard
->
code
));
driver
->
setTransform
(
irr
::
video
::
ETS_WORLD
,
pcard
->
mTransform
);
driver
->
setMaterial
(
matManager
.
mCard
);
driver
->
drawVertexPrimitiveList
(
matManager
.
vCardFront
,
4
,
matManager
.
iRectangle
,
2
);
if
(
pcard
->
controler
==
0
||
!
imageManager
.
tCover
[
1
])
matManager
.
mCard
.
setTexture
(
0
,
imageManager
.
tCover
[
0
]);
else
matManager
.
mCard
.
setTexture
(
0
,
imageManager
.
tCover
[
1
]);
driver
->
setMaterial
(
matManager
.
mCard
);
driver
->
drawVertexPrimitiveList
(
matManager
.
vCardBack
,
4
,
matManager
.
iRectangle
,
2
);
auto
m22
=
pcard
->
mTransform
(
2
,
2
);
if
(
m22
>
-
0.99
||
pcard
->
is_moving
)
{
matManager
.
mCard
.
setTexture
(
0
,
imageManager
.
GetTexture
(
pcard
->
code
));
driver
->
setMaterial
(
matManager
.
mCard
);
driver
->
drawVertexPrimitiveList
(
matManager
.
vCardFront
,
4
,
matManager
.
iRectangle
,
2
);
}
if
(
m22
<
0.99
||
pcard
->
is_moving
)
{
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
)
{
matManager
.
mTexture
.
setTexture
(
0
,
imageManager
.
tEquip
);
driver
->
setMaterial
(
matManager
.
mTexture
);
...
...
@@ -285,6 +292,10 @@ void Game::DrawCard(ClientCard* pcard) {
matManager
.
mTexture
.
setTexture
(
0
,
imageManager
.
tTarget
);
driver
->
setMaterial
(
matManager
.
mTexture
);
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
))
{
matManager
.
mTexture
.
setTexture
(
0
,
imageManager
.
tNegated
);
driver
->
setMaterial
(
matManager
.
mTexture
);
...
...
@@ -845,7 +856,7 @@ void Game::DrawSpec() {
matk
.
setRotationRadians
(
atk_r
);
driver
->
setTransform
(
irr
::
video
::
ETS_WORLD
,
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
;
if
(
attack_sv
>
28
)
attack_sv
=
0
;
...
...
gframe/duelclient.cpp
View file @
03cc48c7
...
...
@@ -1160,7 +1160,8 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
int
c
,
l
,
s
,
ss
;
unsigned
int
code
;
bool
panelmode
=
false
;
mainGame
->
dField
.
select_ready
=
false
;
bool
select_ready
=
mainGame
->
dField
.
select_min
==
0
;
mainGame
->
dField
.
select_ready
=
select_ready
;
ClientCard
*
pcard
;
for
(
int
i
=
0
;
i
<
count
;
++
i
)
{
code
=
(
unsigned
int
)
BufferIO
::
ReadInt32
(
pbuf
);
...
...
@@ -1190,7 +1191,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
if
(
panelmode
)
{
mainGame
->
gMutex
.
Lock
();
mainGame
->
wCardSelect
->
setText
(
textBuffer
);
mainGame
->
dField
.
ShowSelectCard
();
mainGame
->
dField
.
ShowSelectCard
(
select_ready
);
mainGame
->
gMutex
.
Unlock
();
}
else
{
mainGame
->
stHintMsg
->
setText
(
textBuffer
);
...
...
@@ -1198,6 +1199,8 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
}
if
(
mainGame
->
dField
.
select_cancelable
)
{
mainGame
->
dField
.
ShowCancelOrFinishButton
(
1
);
}
else
if
(
select_ready
)
{
mainGame
->
dField
.
ShowCancelOrFinishButton
(
2
);
}
else
{
mainGame
->
dField
.
ShowCancelOrFinishButton
(
0
);
}
...
...
@@ -1999,9 +2002,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
mainGame
->
gMutex
.
Lock
();
mainGame
->
dField
.
AddCard
(
pcard
,
cc
,
cl
,
cs
);
mainGame
->
gMutex
.
Unlock
();
mainGame
->
dField
.
GetCardLocation
(
pcard
,
&
pcard
->
curPos
,
&
pcard
->
curRot
);
pcard
->
mTransform
.
setTranslation
(
pcard
->
curPos
);
pcard
->
mTransform
.
setRotationRadians
(
pcard
->
curRot
);
mainGame
->
dField
.
GetCardLocation
(
pcard
,
&
pcard
->
curPos
,
&
pcard
->
curRot
,
true
);
pcard
->
curAlpha
=
5
;
mainGame
->
dField
.
FadeCard
(
pcard
,
255
,
20
);
mainGame
->
WaitFrameSignal
(
20
);
...
...
@@ -2042,8 +2043,10 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
pcard
->
equipTarget
=
0
;
}
}
pcard
->
is_hovered
=
false
;
pcard
->
is_showequip
=
false
;
pcard
->
is_showtarget
=
false
;
pcard
->
is_showchaintarget
=
false
;
if
(
mainGame
->
dInfo
.
isReplay
&&
mainGame
->
dInfo
.
isReplaySkiping
)
{
mainGame
->
dField
.
RemoveCard
(
pc
,
pl
,
ps
);
pcard
->
position
=
cp
;
...
...
@@ -2094,6 +2097,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
pcard
->
counters
.
clear
();
pcard
->
ClearTarget
();
pcard
->
is_showtarget
=
false
;
pcard
->
is_showchaintarget
=
false
;
ClientCard
*
olcard
=
mainGame
->
dField
.
GetCard
(
cc
,
cl
&
0x7f
,
cs
);
if
(
mainGame
->
dInfo
.
isReplay
&&
mainGame
->
dInfo
.
isReplaySkiping
)
{
mainGame
->
dField
.
RemoveCard
(
pc
,
pl
,
ps
);
...
...
@@ -2358,13 +2362,14 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
mainGame
->
dField
.
current_chain
.
sequence
=
cs
;
mainGame
->
dField
.
GetChainLocation
(
cc
,
cl
,
cs
,
&
mainGame
->
dField
.
current_chain
.
chain_pos
);
mainGame
->
dField
.
current_chain
.
solved
=
false
;
mainGame
->
dField
.
current_chain
.
target
.
clear
();
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
(
mainGame
->
dField
.
chains
[
i
].
controler
==
cc
&&
mainGame
->
dField
.
chains
[
i
].
location
==
cl
)
if
(
chit
->
controler
==
cc
&&
chit
->
location
==
cl
)
chc
++
;
}
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
++
;
}
}
...
...
@@ -2457,14 +2462,14 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
pbuf
+=
count
*
4
;
return
true
;
}
ClientCard
*
pcard
;
for
(
int
i
=
0
;
i
<
count
;
++
i
)
{
int
c
=
mainGame
->
LocalPlayer
(
BufferIO
::
ReadInt8
(
pbuf
));
int
l
=
BufferIO
::
ReadInt8
(
pbuf
);
int
s
=
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
;
mainGame
->
dField
.
current_chain
.
target
.
insert
(
pcard
);
if
(
pcard
->
location
&
LOCATION_ONFIELD
)
{
for
(
int
j
=
0
;
j
<
3
;
++
j
)
{
mainGame
->
dField
.
FadeCard
(
pcard
,
5
,
5
);
...
...
@@ -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
.
current_chain
.
solved
=
false
;
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
(
mainGame
->
dField
.
chains
[
i
].
controler
==
cc
&&
mainGame
->
dField
.
chains
[
i
].
location
==
cl
)
if
(
chit
->
controler
==
cc
&&
chit
->
location
==
cl
)
chc
++
;
}
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
++
;
}
}
...
...
gframe/event_handler.cpp
View file @
03cc48c7
...
...
@@ -29,7 +29,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
case
BUTTON_HAND2
:
case
BUTTON_HAND3
:
{
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
::
SendResponse
();
}
else
{
...
...
@@ -204,7 +204,6 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
else
DuelClient
::
SendResponse
();
}
break
;
}
if
(
mainGame
->
wQuery
->
isVisible
())
{
SetResponseSelectedCards
();
...
...
@@ -1570,7 +1569,6 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
else
DuelClient
::
SendResponse
();
}
break
;
}
if
(
mainGame
->
wQuery
->
isVisible
())
{
SetResponseSelectedCards
();
...
...
@@ -1697,7 +1695,6 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
mplayer
=
1
;
}
}
if
(
hovered_location
==
LOCATION_HAND
&&
(
mainGame
->
dInfo
.
is_shuffling
||
mainGame
->
dInfo
.
curMsg
==
MSG_SHUFFLE_HAND
))
mcard
=
0
;
if
(
mcard
==
0
&&
mplayer
<
0
)
...
...
@@ -1717,17 +1714,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
if
(
hovered_controler
==
0
)
mainGame
->
hideChat
=
false
;
}
if
(
hovered_card
->
equipTarget
)
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
;
SetShowMark
(
hovered_card
,
false
);
}
if
(
mcard
)
{
if
(
mcard
!=
clicked_card
)
...
...
@@ -1738,14 +1725,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
if
(
hovered_controler
==
0
)
mainGame
->
hideChat
=
true
;
}
if
(
mcard
->
equipTarget
)
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
;
SetShowMark
(
mcard
,
true
);
if
(
mcard
->
code
)
{
mainGame
->
ShowCardInfo
(
mcard
->
code
);
if
(
mcard
->
location
&
0xe
)
{
...
...
@@ -2299,6 +2279,24 @@ void ClientField::ShowCancelOrFinishButton(int buttonOp) {
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
{
unsigned
char
respbuf
[
64
];
respbuf
[
0
]
=
selected_cards
.
size
();
...
...
gframe/game.cpp
View file @
03cc48c7
...
...
@@ -46,8 +46,6 @@ bool Game::Initialize() {
is_building
=
false
;
memset
(
&
dInfo
,
0
,
sizeof
(
DuelInfo
));
memset
(
chatTiming
,
0
,
sizeof
(
chatTiming
));
for
(
int
i
=
0
;
i
<
2048
;
++
i
)
dataManager
.
_sysStrings
[
i
]
=
0
;
deckManager
.
LoadLFList
();
driver
=
device
->
getVideoDriver
();
driver
->
setTextureCreationFlag
(
irr
::
video
::
ETCF_CREATE_MIP_MAPS
,
false
);
...
...
@@ -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
)
{
int
pbuffer
=
0
;
u32
_width
=
0
,
_height
=
0
;
wchar_t
prev
=
0
;
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'
)
{
dataManager
.
strBuffer
[
pbuffer
++
]
=
L'\n'
;
_width
=
0
;
_height
++
;
prev
=
0
;
if
(
_height
==
pos
)
pbuffer
=
0
;
continue
;
...
...
@@ -750,11 +752,12 @@ void Game::SetStaticText(irr::gui::IGUIStaticText* pControl, u32 cWidth, irr::gu
dataManager
.
strBuffer
[
pbuffer
++
]
=
L'\n'
;
_width
=
0
;
_height
++
;
prev
=
0
;
if
(
_height
==
pos
)
pbuffer
=
0
;
}
_width
+=
w
;
dataManager
.
strBuffer
[
pbuffer
++
]
=
text
[
i
]
;
dataManager
.
strBuffer
[
pbuffer
++
]
=
c
;
}
dataManager
.
strBuffer
[
pbuffer
]
=
0
;
pControl
->
setText
(
dataManager
.
strBuffer
);
...
...
@@ -1223,6 +1226,7 @@ void Game::CloseDuelWindow() {
btnChainAlways
->
setVisible
(
false
);
btnChainWhenAvail
->
setVisible
(
false
);
btnCancelOrFinish
->
setVisible
(
false
);
btnShuffle
->
setVisible
(
false
);
wChat
->
setVisible
(
false
);
lstLog
->
clear
();
logParam
.
clear
();
...
...
gframe/image_manager.cpp
View file @
03cc48c7
...
...
@@ -7,6 +7,8 @@ ImageManager imageManager;
bool
ImageManager
::
Initial
()
{
tCover
[
0
]
=
driver
->
getTexture
(
"textures/cover.jpg"
);
tCover
[
1
]
=
driver
->
getTexture
(
"textures/cover2.jpg"
);
if
(
!
tCover
[
1
])
tCover
[
1
]
=
tCover
[
0
];
tUnknown
=
driver
->
getTexture
(
"textures/unknown.jpg"
);
tAct
=
driver
->
getTexture
(
"textures/act.png"
);
tAttack
=
driver
->
getTexture
(
"textures/attack.png"
);
...
...
@@ -18,6 +20,7 @@ bool ImageManager::Initial() {
tMask
=
driver
->
getTexture
(
"textures/mask.png"
);
tEquip
=
driver
->
getTexture
(
"textures/equip.png"
);
tTarget
=
driver
->
getTexture
(
"textures/target.png"
);
tChainTarget
=
driver
->
getTexture
(
"textures/chaintarget.png"
);
tLim
=
driver
->
getTexture
(
"textures/lim.png"
);
tOT
=
driver
->
getTexture
(
"textures/ot.png"
);
tHand
[
0
]
=
driver
->
getTexture
(
"textures/f1.jpg"
);
...
...
gframe/image_manager.h
View file @
03cc48c7
...
...
@@ -34,6 +34,7 @@ public:
irr
::
video
::
ITexture
*
tMask
;
irr
::
video
::
ITexture
*
tEquip
;
irr
::
video
::
ITexture
*
tTarget
;
irr
::
video
::
ITexture
*
tChainTarget
;
irr
::
video
::
ITexture
*
tLim
;
irr
::
video
::
ITexture
*
tOT
;
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
#forbidden
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