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
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
REIKAI
ygopro
Commits
48d84bcc
Commit
48d84bcc
authored
Jun 02, 2018
by
nanahira
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into side
parents
9f632d6e
ee40e6d0
Changes
21
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
160 additions
and
68 deletions
+160
-68
.gitignore
.gitignore
+1
-0
cards.cdb
cards.cdb
+0
-0
gframe/client_field.cpp
gframe/client_field.cpp
+28
-0
gframe/client_field.h
gframe/client_field.h
+2
-0
gframe/deck_manager.cpp
gframe/deck_manager.cpp
+1
-18
gframe/deck_manager.h
gframe/deck_manager.h
+1
-4
gframe/drawing.cpp
gframe/drawing.cpp
+67
-12
gframe/duelclient.cpp
gframe/duelclient.cpp
+10
-4
gframe/event_handler.cpp
gframe/event_handler.cpp
+1
-1
gframe/game.cpp
gframe/game.cpp
+22
-19
gframe/game.h
gframe/game.h
+3
-1
gframe/image_manager.cpp
gframe/image_manager.cpp
+1
-0
gframe/image_manager.h
gframe/image_manager.h
+1
-0
gframe/replay_mode.cpp
gframe/replay_mode.cpp
+1
-0
gframe/single_duel.cpp
gframe/single_duel.cpp
+9
-2
gframe/single_mode.cpp
gframe/single_mode.cpp
+1
-0
gframe/tag_duel.cpp
gframe/tag_duel.cpp
+8
-2
ocgcore
ocgcore
+1
-1
premake4.lua
premake4.lua
+1
-3
script
script
+1
-1
textures/clock.png
textures/clock.png
+0
-0
No files found.
.gitignore
View file @
48d84bcc
...
@@ -76,6 +76,7 @@
...
@@ -76,6 +76,7 @@
*.log
*.log
/.vscode
/.vscode
/bak/
/bak/
/output
/temp
/temp
[Tt]humbs.cdb
[Tt]humbs.cdb
...
...
cards.cdb
View file @
48d84bcc
No preview for this file type
gframe/client_field.cpp
View file @
48d84bcc
...
@@ -94,6 +94,7 @@ void ClientField::Clear() {
...
@@ -94,6 +94,7 @@ void ClientField::Clear() {
pzone_act
[
1
]
=
false
;
pzone_act
[
1
]
=
false
;
conti_act
=
false
;
conti_act
=
false
;
deck_reversed
=
false
;
deck_reversed
=
false
;
RefreshCardCountDisplay
();
}
}
void
ClientField
::
Initial
(
int
player
,
int
deckc
,
int
extrac
)
{
void
ClientField
::
Initial
(
int
player
,
int
deckc
,
int
extrac
)
{
ClientCard
*
pcard
;
ClientCard
*
pcard
;
...
@@ -117,6 +118,7 @@ void ClientField::Initial(int player, int deckc, int extrac) {
...
@@ -117,6 +118,7 @@ void ClientField::Initial(int player, int deckc, int extrac) {
pcard
->
position
=
POS_FACEDOWN_DEFENSE
;
pcard
->
position
=
POS_FACEDOWN_DEFENSE
;
GetCardLocation
(
pcard
,
&
pcard
->
curPos
,
&
pcard
->
curRot
,
true
);
GetCardLocation
(
pcard
,
&
pcard
->
curPos
,
&
pcard
->
curRot
,
true
);
}
}
RefreshCardCountDisplay
();
}
}
ClientCard
*
ClientField
::
GetCard
(
int
controler
,
int
location
,
int
sequence
,
int
sub_seq
)
{
ClientCard
*
ClientField
::
GetCard
(
int
controler
,
int
location
,
int
sequence
,
int
sub_seq
)
{
std
::
vector
<
ClientCard
*>*
lst
=
0
;
std
::
vector
<
ClientCard
*>*
lst
=
0
;
...
@@ -226,6 +228,7 @@ void ClientField::AddCard(ClientCard* pcard, int controler, int location, int se
...
@@ -226,6 +228,7 @@ void ClientField::AddCard(ClientCard* pcard, int controler, int location, int se
break
;
break
;
}
}
}
}
RefreshCardCountDisplay
();
}
}
ClientCard
*
ClientField
::
RemoveCard
(
int
controler
,
int
location
,
int
sequence
)
{
ClientCard
*
ClientField
::
RemoveCard
(
int
controler
,
int
location
,
int
sequence
)
{
ClientCard
*
pcard
=
0
;
ClientCard
*
pcard
=
0
;
...
@@ -297,6 +300,7 @@ ClientCard* ClientField::RemoveCard(int controler, int location, int sequence) {
...
@@ -297,6 +300,7 @@ ClientCard* ClientField::RemoveCard(int controler, int location, int sequence) {
}
}
}
}
pcard
->
location
=
0
;
pcard
->
location
=
0
;
RefreshCardCountDisplay
();
return
pcard
;
return
pcard
;
}
}
void
ClientField
::
UpdateCard
(
int
controler
,
int
location
,
int
sequence
,
char
*
data
)
{
void
ClientField
::
UpdateCard
(
int
controler
,
int
location
,
int
sequence
,
char
*
data
)
{
...
@@ -1462,4 +1466,28 @@ void ClientField::UpdateDeclarableCode(bool enter) {
...
@@ -1462,4 +1466,28 @@ void ClientField::UpdateDeclarableCode(bool enter) {
else
else
UpdateDeclarableCodeOpcode
(
enter
);
UpdateDeclarableCodeOpcode
(
enter
);
}
}
void
ClientField
::
RefreshCardCountDisplay
()
{
for
(
int
p
=
0
;
p
<
2
;
++
p
)
{
mainGame
->
dInfo
.
card_count
[
p
]
=
hand
[
p
].
size
();
for
(
auto
it
=
mzone
[
p
].
begin
();
it
!=
mzone
[
p
].
end
();
++
it
)
{
if
(
*
it
)
mainGame
->
dInfo
.
card_count
[
p
]
++
;
}
for
(
auto
it
=
szone
[
p
].
begin
();
it
!=
szone
[
p
].
end
();
++
it
)
{
if
(
*
it
)
mainGame
->
dInfo
.
card_count
[
p
]
++
;
}
myswprintf
(
mainGame
->
dInfo
.
str_card_count
[
p
],
L"%d"
,
mainGame
->
dInfo
.
card_count
[
p
]);
}
if
(
mainGame
->
dInfo
.
card_count
[
0
]
>
mainGame
->
dInfo
.
card_count
[
1
])
{
mainGame
->
dInfo
.
card_count_color
[
0
]
=
0xffffff00
;
mainGame
->
dInfo
.
card_count_color
[
1
]
=
0xffff0000
;
}
else
if
(
mainGame
->
dInfo
.
card_count
[
1
]
>
mainGame
->
dInfo
.
card_count
[
0
])
{
mainGame
->
dInfo
.
card_count_color
[
1
]
=
0xffffff00
;
mainGame
->
dInfo
.
card_count_color
[
0
]
=
0xffff0000
;
}
else
{
mainGame
->
dInfo
.
card_count_color
[
0
]
=
0xffffffff
;
mainGame
->
dInfo
.
card_count_color
[
1
]
=
0xffffffff
;
}
}
}
}
gframe/client_field.h
View file @
48d84bcc
...
@@ -115,6 +115,8 @@ public:
...
@@ -115,6 +115,8 @@ public:
void
UpdateDeclarableCodeOpcode
(
bool
enter
);
void
UpdateDeclarableCodeOpcode
(
bool
enter
);
void
UpdateDeclarableCode
(
bool
enter
);
void
UpdateDeclarableCode
(
bool
enter
);
void
RefreshCardCountDisplay
();
irr
::
gui
::
IGUIElement
*
panel
;
irr
::
gui
::
IGUIElement
*
panel
;
std
::
vector
<
int
>
ancard
;
std
::
vector
<
int
>
ancard
;
int
hovered_controler
;
int
hovered_controler
;
...
...
gframe/deck_manager.cpp
View file @
48d84bcc
...
@@ -313,24 +313,7 @@ bool DeckManager::DeleteDeck(Deck& deck, const wchar_t* name) {
...
@@ -313,24 +313,7 @@ bool DeckManager::DeleteDeck(Deck& deck, const wchar_t* name) {
return
result
==
0
;
return
result
==
0
;
#endif
#endif
}
}
const
wchar_t
*
DeckManager
::
GetMainFormatString
()
{
int
DeckManager
::
TypeCount
(
std
::
vector
<
code_pointer
>
list
,
unsigned
int
ctype
)
{
myswprintf
(
DeckFormatBuffer
,
L"%d ( Monster: %d / Spell: %d / Trap: %d )"
,
deckManager
.
current_deck
.
main
.
size
(),
GetTypeCount
(
deckManager
.
current_deck
.
main
,
TYPE_MONSTER
),
GetTypeCount
(
deckManager
.
current_deck
.
main
,
TYPE_SPELL
),
GetTypeCount
(
deckManager
.
current_deck
.
main
,
TYPE_TRAP
));
wchar_t
*
result
=
DeckFormatBuffer
;
return
result
;
}
const
wchar_t
*
DeckManager
::
GetExtraFormatString
()
{
myswprintf
(
DeckFormatBuffer
,
L"%d ( Fusion: %d / Synchro: %d / Xyz: %d / Link: %d )"
,
deckManager
.
current_deck
.
extra
.
size
(),
GetTypeCount
(
deckManager
.
current_deck
.
extra
,
TYPE_FUSION
),
GetTypeCount
(
deckManager
.
current_deck
.
extra
,
TYPE_SYNCHRO
),
GetTypeCount
(
deckManager
.
current_deck
.
extra
,
TYPE_XYZ
),
GetTypeCount
(
deckManager
.
current_deck
.
extra
,
TYPE_LINK
));
wchar_t
*
result
=
DeckFormatBuffer
;
return
result
;
}
const
wchar_t
*
DeckManager
::
GetSideFormatString
()
{
int
mc
=
GetTypeCount
(
deckManager
.
current_deck
.
side
,
TYPE_MONSTER
);
int
ec
=
GetTypeCount
(
deckManager
.
current_deck
.
side
,
TYPE_FUSION
|
TYPE_SYNCHRO
|
TYPE_XYZ
|
TYPE_LINK
);
myswprintf
(
DeckFormatBuffer
,
L"%d ( Monster: %d / Spell: %d / Trap: %d / Extra: %d )"
,
deckManager
.
current_deck
.
side
.
size
(),
mc
-
ec
,
GetTypeCount
(
deckManager
.
current_deck
.
side
,
TYPE_SPELL
),
GetTypeCount
(
deckManager
.
current_deck
.
side
,
TYPE_TRAP
),
ec
);
wchar_t
*
result
=
DeckFormatBuffer
;
return
result
;
}
int
DeckManager
::
GetTypeCount
(
std
::
vector
<
code_pointer
>
list
,
unsigned
int
ctype
)
{
int
res
=
0
;
int
res
=
0
;
for
(
size_t
i
=
0
;
i
<
list
.
size
();
++
i
)
{
for
(
size_t
i
=
0
;
i
<
list
.
size
();
++
i
)
{
code_pointer
cur
=
list
[
i
];
code_pointer
cur
=
list
[
i
];
...
...
gframe/deck_manager.h
View file @
48d84bcc
...
@@ -46,10 +46,7 @@ public:
...
@@ -46,10 +46,7 @@ public:
bool
DeleteDeck
(
Deck
&
deck
,
const
wchar_t
*
name
);
bool
DeleteDeck
(
Deck
&
deck
,
const
wchar_t
*
name
);
static
bool
RenameDeck
(
const
wchar_t
*
oldname
,
const
wchar_t
*
newname
);
static
bool
RenameDeck
(
const
wchar_t
*
oldname
,
const
wchar_t
*
newname
);
wchar_t
DeckFormatBuffer
[
128
];
wchar_t
DeckFormatBuffer
[
128
];
const
wchar_t
*
GetMainFormatString
();
int
TypeCount
(
std
::
vector
<
code_pointer
>
list
,
unsigned
int
ctype
);
const
wchar_t
*
GetSideFormatString
();
const
wchar_t
*
GetExtraFormatString
();
int
GetTypeCount
(
std
::
vector
<
code_pointer
>
list
,
unsigned
int
ctype
);
};
};
extern
DeckManager
deckManager
;
extern
DeckManager
deckManager
;
...
...
gframe/drawing.cpp
View file @
48d84bcc
This diff is collapsed.
Click to expand it.
gframe/duelclient.cpp
View file @
48d84bcc
...
@@ -2334,7 +2334,13 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
...
@@ -2334,7 +2334,13 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
}
}
case
MSG_SHUFFLE_SET_CARD
:
{
case
MSG_SHUFFLE_SET_CARD
:
{
std
::
vector
<
ClientCard
*>::
iterator
cit
;
std
::
vector
<
ClientCard
*>::
iterator
cit
;
std
::
vector
<
ClientCard
*>*
lst
=
0
;
int
loc
=
BufferIO
::
ReadInt8
(
pbuf
);
int
count
=
BufferIO
::
ReadInt8
(
pbuf
);
int
count
=
BufferIO
::
ReadInt8
(
pbuf
);
if
(
loc
==
LOCATION_MZONE
)
lst
=
mainGame
->
dField
.
mzone
;
else
lst
=
mainGame
->
dField
.
szone
;
ClientCard
*
mc
[
5
];
ClientCard
*
mc
[
5
];
ClientCard
*
swp
;
ClientCard
*
swp
;
int
c
,
l
,
s
,
ps
;
int
c
,
l
,
s
,
ps
;
...
@@ -2343,7 +2349,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
...
@@ -2343,7 +2349,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
l
=
BufferIO
::
ReadInt8
(
pbuf
);
l
=
BufferIO
::
ReadInt8
(
pbuf
);
s
=
BufferIO
::
ReadInt8
(
pbuf
);
s
=
BufferIO
::
ReadInt8
(
pbuf
);
BufferIO
::
ReadInt8
(
pbuf
);
BufferIO
::
ReadInt8
(
pbuf
);
mc
[
i
]
=
mainGame
->
dField
.
mzone
[
c
][
s
];
mc
[
i
]
=
lst
[
c
][
s
];
mc
[
i
]
->
SetCode
(
0
);
mc
[
i
]
->
SetCode
(
0
);
if
(
!
mainGame
->
dInfo
.
isReplaySkiping
)
{
if
(
!
mainGame
->
dInfo
.
isReplaySkiping
)
{
mc
[
i
]
->
dPos
=
irr
::
core
::
vector3df
((
3.95
f
-
mc
[
i
]
->
curPos
.
X
)
/
10
,
0
,
0.05
f
);
mc
[
i
]
->
dPos
=
irr
::
core
::
vector3df
((
3.95
f
-
mc
[
i
]
->
curPos
.
X
)
/
10
,
0
,
0.05
f
);
...
@@ -2361,9 +2367,9 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
...
@@ -2361,9 +2367,9 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
BufferIO
::
ReadInt8
(
pbuf
);
BufferIO
::
ReadInt8
(
pbuf
);
ps
=
mc
[
i
]
->
sequence
;
ps
=
mc
[
i
]
->
sequence
;
if
(
l
>
0
)
{
if
(
l
>
0
)
{
swp
=
mainGame
->
dField
.
mzone
[
c
][
s
];
swp
=
lst
[
c
][
s
];
mainGame
->
dField
.
mzone
[
c
][
ps
]
=
swp
;
lst
[
c
][
ps
]
=
swp
;
mainGame
->
dField
.
mzone
[
c
][
s
]
=
mc
[
i
];
lst
[
c
][
s
]
=
mc
[
i
];
mc
[
i
]
->
sequence
=
s
;
mc
[
i
]
->
sequence
=
s
;
swp
->
sequence
=
ps
;
swp
->
sequence
=
ps
;
}
}
...
...
gframe/event_handler.cpp
View file @
48d84bcc
...
@@ -1858,7 +1858,7 @@ bool ClientField::OnCommonEvent(const irr::SEvent& event) {
...
@@ -1858,7 +1858,7 @@ bool ClientField::OnCommonEvent(const irr::SEvent& event) {
break
;
break
;
}
}
u32
pos
=
mainGame
->
scrCardText
->
getPos
();
u32
pos
=
mainGame
->
scrCardText
->
getPos
();
mainGame
->
SetStaticText
(
mainGame
->
stText
,
mainGame
->
stText
->
getRelativePosition
().
getWidth
()
-
25
,
mainGame
->
text
Font
,
mainGame
->
showingtext
,
pos
);
mainGame
->
SetStaticText
(
mainGame
->
stText
,
mainGame
->
stText
->
getRelativePosition
().
getWidth
()
-
25
,
mainGame
->
gui
Font
,
mainGame
->
showingtext
,
pos
);
return
true
;
return
true
;
break
;
break
;
}
}
...
...
gframe/game.cpp
View file @
48d84bcc
...
@@ -855,7 +855,6 @@ void Game::RefreshTimeDisplay() {
...
@@ -855,7 +855,6 @@ void Game::RefreshTimeDisplay() {
}
}
myswprintf
(
dInfo
.
str_time_left
[
0
],
L"%d"
,
dInfo
.
time_left
[
0
]);
myswprintf
(
dInfo
.
str_time_left
[
0
],
L"%d"
,
dInfo
.
time_left
[
0
]);
myswprintf
(
dInfo
.
str_time_left
[
1
],
L"%d"
,
dInfo
.
time_left
[
1
]);
myswprintf
(
dInfo
.
str_time_left
[
1
],
L"%d"
,
dInfo
.
time_left
[
1
]);
myswprintf
(
dInfo
.
str_time_limit
,
L"%d"
,
dInfo
.
time_limit
);
}
}
void
Game
::
BuildProjectionMatrix
(
irr
::
core
::
matrix4
&
mProjection
,
f32
left
,
f32
right
,
f32
bottom
,
f32
top
,
f32
znear
,
f32
zfar
)
{
void
Game
::
BuildProjectionMatrix
(
irr
::
core
::
matrix4
&
mProjection
,
f32
left
,
f32
right
,
f32
bottom
,
f32
top
,
f32
znear
,
f32
zfar
)
{
for
(
int
i
=
0
;
i
<
16
;
++
i
)
for
(
int
i
=
0
;
i
<
16
;
++
i
)
...
@@ -1435,7 +1434,7 @@ void Game::ShowCardInfo(int code, bool resize) {
...
@@ -1435,7 +1434,7 @@ void Game::ShowCardInfo(int code, bool resize) {
sc
=
aptr
->
second
.
setcode
;
sc
=
aptr
->
second
.
setcode
;
}
}
if
(
sc
)
{
if
(
sc
)
{
offset
=
23
*
yScale
;
offset
=
23
;
// *
yScale;
myswprintf
(
formatBuffer
,
L"%ls%ls"
,
dataManager
.
GetSysString
(
1329
),
dataManager
.
FormatSetName
(
sc
));
myswprintf
(
formatBuffer
,
L"%ls%ls"
,
dataManager
.
GetSysString
(
1329
),
dataManager
.
FormatSetName
(
sc
));
stSetName
->
setText
(
formatBuffer
);
stSetName
->
setText
(
formatBuffer
);
}
else
}
else
...
@@ -1476,24 +1475,24 @@ void Game::ShowCardInfo(int code, bool resize) {
...
@@ -1476,24 +1475,24 @@ void Game::ShowCardInfo(int code, bool resize) {
wcscat
(
formatBuffer
,
scaleBuffer
);
wcscat
(
formatBuffer
,
scaleBuffer
);
}
}
stDataInfo
->
setText
(
formatBuffer
);
stDataInfo
->
setText
(
formatBuffer
);
if
(
cd
.
type
&
TYPE_LINK
&&
cd
.
level
>
5
&&
window_size
.
Width
<
1220.0
)
{
int
offset_sayuri
=
0
;
stDataInfo
->
setRelativePosition
(
recti
(
15
,
60
*
yScale
,
300
*
xScale
-
13
,
(
83
+
15
)
*
yScale
));
if
(
cd
.
type
&
TYPE_LINK
&&
cd
.
level
>
5
&&
window_size
.
Width
<
1220.0
)
stSetName
->
setRelativePosition
(
rect
<
s32
>
(
15
,
(
83
+
15
)
*
yScale
,
296
*
xScale
,
(
83
+
15
)
*
yScale
+
offset
));
offset_sayuri
=
15
;
stText
->
setRelativePosition
(
rect
<
s32
>
(
15
,
(
83
+
15
)
*
yScale
+
offset
,
287
*
xScale
,
324
*
yScale
));
stDataInfo
->
setRelativePosition
(
rect
<
s32
>
(
15
,
60
,
300
*
xScale
-
13
,
(
83
+
offset_sayuri
)));
scrCardText
->
setRelativePosition
(
rect
<
s32
>
(
287
*
xScale
-
20
,
(
83
+
15
)
+
offset
,
287
*
xScale
,
324
*
yScale
));
//stSetName->setRelativePosition(rect<s32>(15, (83 + offset_sayuri) * yScale, 296 * xScale, (83 + offset_sayuri) * yScale + offset));
}
else
{
//stText->setRelativePosition(rect<s32>(15, (83 + offset_sayuri) * yScale + offset, 287 * xScale, 324 * yScale));
stDataInfo
->
setRelativePosition
(
recti
(
15
,
60
*
yScale
,
300
*
xScale
-
13
,
83
*
yScale
));
stSetName
->
setRelativePosition
(
rect
<
s32
>
(
15
,
(
83
+
offset_sayuri
),
296
*
xScale
,
(
83
+
offset_sayuri
)
+
offset
));
stSetName
->
setRelativePosition
(
rect
<
s32
>
(
15
,
83
*
yScale
,
296
*
xScale
,
83
*
yScale
+
offset
));
stText
->
setRelativePosition
(
rect
<
s32
>
(
15
,
(
83
+
offset_sayuri
)
+
offset
,
287
*
xScale
,
324
*
yScale
));
stText
->
setRelativePosition
(
rect
<
s32
>
(
15
,
83
*
yScale
+
offset
,
287
*
xScale
,
324
*
yScale
));
scrCardText
->
setRelativePosition
(
rect
<
s32
>
(
287
*
xScale
-
20
,
(
83
+
offset_sayuri
)
+
offset
,
287
*
xScale
,
324
*
yScale
));
scrCardText
->
setRelativePosition
(
rect
<
s32
>
(
287
*
xScale
-
20
,
83
+
offset
,
287
*
xScale
,
324
*
yScale
));
}
}
else
{
}
else
{
myswprintf
(
formatBuffer
,
L"[%ls]"
,
dataManager
.
FormatType
(
cd
.
type
));
myswprintf
(
formatBuffer
,
L"[%ls]"
,
dataManager
.
FormatType
(
cd
.
type
));
stInfo
->
setText
(
formatBuffer
);
stInfo
->
setText
(
formatBuffer
);
stDataInfo
->
setRelativePosition
(
recti
(
15
,
60
*
yScale
,
300
*
xScale
-
13
,
83
*
yScale
));
stDataInfo
->
setRelativePosition
(
recti
(
15
,
60
,
300
*
xScale
-
13
,
83
));
stDataInfo
->
setText
(
L""
);
stDataInfo
->
setText
(
L""
);
stSetName
->
setRelativePosition
(
rect
<
s32
>
(
15
,
60
*
yScale
,
296
*
xScale
,
60
*
yScale
+
offset
));
//stSetName->setRelativePosition(rect<s32>(15, 60 * yScale, 296 * xScale, 60 * yScale + offset));
stText
->
setRelativePosition
(
rect
<
s32
>
(
15
,
60
*
yScale
+
offset
,
287
*
xScale
,
324
*
yScale
));
//stText->setRelativePosition(rect<s32>(15, 60 * yScale + offset, 287 * xScale, 324 * yScale));
stSetName
->
setRelativePosition
(
rect
<
s32
>
(
15
,
60
,
296
*
xScale
,
60
+
offset
));
stText
->
setRelativePosition
(
rect
<
s32
>
(
15
,
60
+
offset
,
287
*
xScale
,
324
*
yScale
));
scrCardText
->
setRelativePosition
(
rect
<
s32
>
(
287
*
xScale
-
20
,
60
+
offset
,
287
*
xScale
,
324
*
yScale
));
scrCardText
->
setRelativePosition
(
rect
<
s32
>
(
287
*
xScale
-
20
,
60
+
offset
,
287
*
xScale
,
324
*
yScale
));
}
}
showingcode
=
code
;
showingcode
=
code
;
...
@@ -1673,6 +1672,9 @@ void Game::CloseDuelWindow() {
...
@@ -1673,6 +1672,9 @@ void Game::CloseDuelWindow() {
wReplaySave
->
setVisible
(
false
);
wReplaySave
->
setVisible
(
false
);
stHintMsg
->
setVisible
(
false
);
stHintMsg
->
setVisible
(
false
);
btnSideOK
->
setVisible
(
false
);
btnSideOK
->
setVisible
(
false
);
btnSideShuffle
->
setVisible
(
false
);
btnSideSort
->
setVisible
(
false
);
btnSideReload
->
setVisible
(
false
);
btnLeaveGame
->
setVisible
(
false
);
btnLeaveGame
->
setVisible
(
false
);
btnSpectatorSwap
->
setVisible
(
false
);
btnSpectatorSwap
->
setVisible
(
false
);
btnChainIgnore
->
setVisible
(
false
);
btnChainIgnore
->
setVisible
(
false
);
...
@@ -1716,7 +1718,7 @@ void Game::OnResize() {
...
@@ -1716,7 +1718,7 @@ void Game::OnResize() {
lpcFont
=
irr
::
gui
::
CGUITTFont
::
createTTFont
(
env
,
gameConf
.
numfont
,
48
*
yScale
);
lpcFont
=
irr
::
gui
::
CGUITTFont
::
createTTFont
(
env
,
gameConf
.
numfont
,
48
*
yScale
);
//guiFont = irr::gui::CGUITTFont::createTTFont(env, gameConf.textfont, gameConf.textfontsize * yScale);
//guiFont = irr::gui::CGUITTFont::createTTFont(env, gameConf.textfont, gameConf.textfontsize * yScale);
//env->getSkin()->setFont(guiFont);
//env->getSkin()->setFont(guiFont);
textFont
=
irr
::
gui
::
CGUITTFont
::
createTTFont
(
env
,
gameConf
.
textfont
,
gameConf
.
textfontsize
*
yScale
);
textFont
=
irr
::
gui
::
CGUITTFont
::
createTTFont
(
env
,
gameConf
.
textfont
,
(
yScale
>
0.642
?
gameConf
.
textfontsize
*
yScale
:
9
)
);
old_numFont
->
drop
();
old_numFont
->
drop
();
old_adFont
->
drop
();
old_adFont
->
drop
();
old_lpcFont
->
drop
();
old_lpcFont
->
drop
();
...
@@ -1819,8 +1821,9 @@ void Game::OnResize() {
...
@@ -1819,8 +1821,9 @@ void Game::OnResize() {
wCardImg
->
setRelativePosition
(
ResizeCard
(
1
,
1
,
20
,
18
));
wCardImg
->
setRelativePosition
(
ResizeCard
(
1
,
1
,
20
,
18
));
imgCard
->
setRelativePosition
(
ResizeCard
(
10
,
9
,
0
,
0
));
imgCard
->
setRelativePosition
(
ResizeCard
(
10
,
9
,
0
,
0
));
wInfos
->
setRelativePosition
(
Resize
(
1
,
275
,
301
,
639
));
wInfos
->
setRelativePosition
(
Resize
(
1
,
275
,
301
,
639
));
stName
->
setRelativePosition
(
recti
(
10
,
10
,
300
*
xScale
-
13
,
10
+
22
*
yScale
));
stName
->
setRelativePosition
(
recti
(
10
,
10
,
300
*
xScale
-
13
,
10
+
22
));
stInfo
->
setRelativePosition
(
recti
(
15
,
37
*
yScale
,
300
*
xScale
-
13
,
60
*
yScale
));
//stName->setRelativePosition(recti(10, 10, 300 * xScale - 13, 10 + 22 * yScale));
//stInfo->setRelativePosition(recti(15, 37 * yScale, 300 * xScale - 13, 60 * yScale));
//stDataInfo->setRelativePosition(recti(15, 60 * yScale, 300 * xScale - 13, 83 * yScale));
//stDataInfo->setRelativePosition(recti(15, 60 * yScale, 300 * xScale - 13, 83 * yScale));
lstLog
->
setRelativePosition
(
Resize
(
10
,
10
,
290
,
290
));
lstLog
->
setRelativePosition
(
Resize
(
10
,
10
,
290
,
290
));
//const auto& tsize = stText->getRelativePosition();
//const auto& tsize = stText->getRelativePosition();
...
...
gframe/game.h
View file @
48d84bcc
...
@@ -69,6 +69,7 @@ struct DuelInfo {
...
@@ -69,6 +69,7 @@ struct DuelInfo {
bool
tag_player
[
2
];
bool
tag_player
[
2
];
int
lp
[
2
];
int
lp
[
2
];
int
start_lp
[
2
];
int
start_lp
[
2
];
int
card_count
[
2
];
int
duel_rule
;
int
duel_rule
;
int
turn
;
int
turn
;
short
curMsg
;
short
curMsg
;
...
@@ -82,9 +83,10 @@ struct DuelInfo {
...
@@ -82,9 +83,10 @@ struct DuelInfo {
unsigned
char
time_player
;
unsigned
char
time_player
;
unsigned
short
time_limit
;
unsigned
short
time_limit
;
unsigned
short
time_left
[
2
];
unsigned
short
time_left
[
2
];
wchar_t
str_time_limit
[
16
];
wchar_t
str_time_left
[
2
][
16
];
wchar_t
str_time_left
[
2
][
16
];
video
::
SColor
time_color
[
2
];
video
::
SColor
time_color
[
2
];
wchar_t
str_card_count
[
2
][
16
];
video
::
SColor
card_count_color
[
2
];
bool
isReplaySwapped
;
bool
isReplaySwapped
;
};
};
...
...
gframe/image_manager.cpp
View file @
48d84bcc
...
@@ -74,6 +74,7 @@ bool ImageManager::Initial() {
...
@@ -74,6 +74,7 @@ bool ImageManager::Initial() {
snprintf
(
buff
,
100
,
"textures/pscale/lscale_%d.png"
,
i
);
snprintf
(
buff
,
100
,
"textures/pscale/lscale_%d.png"
,
i
);
tLScale
[
i
]
=
driver
->
getTexture
(
buff
);
tLScale
[
i
]
=
driver
->
getTexture
(
buff
);
}
}
tClock
=
driver
->
getTexture
(
"textures/clock.png"
);
return
true
;
return
true
;
}
}
irr
::
video
::
ITexture
*
ImageManager
::
GetRandomImage
(
int
image_type
)
{
irr
::
video
::
ITexture
*
ImageManager
::
GetRandomImage
(
int
image_type
)
{
...
...
gframe/image_manager.h
View file @
48d84bcc
...
@@ -51,6 +51,7 @@ public:
...
@@ -51,6 +51,7 @@ public:
irr
::
video
::
ITexture
*
tFieldTransparent
[
2
];
irr
::
video
::
ITexture
*
tFieldTransparent
[
2
];
irr
::
video
::
ITexture
*
tRScale
[
14
];
irr
::
video
::
ITexture
*
tRScale
[
14
];
irr
::
video
::
ITexture
*
tLScale
[
14
];
irr
::
video
::
ITexture
*
tLScale
[
14
];
irr
::
video
::
ITexture
*
tClock
;
};
};
extern
ImageManager
imageManager
;
extern
ImageManager
imageManager
;
...
...
gframe/replay_mode.cpp
View file @
48d84bcc
...
@@ -499,6 +499,7 @@ bool ReplayMode::ReplayAnalyze(char* msg, unsigned int len) {
...
@@ -499,6 +499,7 @@ bool ReplayMode::ReplayAnalyze(char* msg, unsigned int len) {
break
;
break
;
}
}
case
MSG_SHUFFLE_SET_CARD
:
{
case
MSG_SHUFFLE_SET_CARD
:
{
pbuf
++
;
count
=
BufferIO
::
ReadInt8
(
pbuf
);
count
=
BufferIO
::
ReadInt8
(
pbuf
);
pbuf
+=
count
*
8
;
pbuf
+=
count
*
8
;
DuelClient
::
ClientAnalyze
(
offset
,
pbuf
-
offset
);
DuelClient
::
ClientAnalyze
(
offset
,
pbuf
-
offset
);
...
...
gframe/single_duel.cpp
View file @
48d84bcc
...
@@ -879,14 +879,21 @@ int SingleDuel::Analyze(char* msgbuffer, unsigned int len) {
...
@@ -879,14 +879,21 @@ int SingleDuel::Analyze(char* msgbuffer, unsigned int len) {
break
;
break
;
}
}
case
MSG_SHUFFLE_SET_CARD
:
{
case
MSG_SHUFFLE_SET_CARD
:
{
int
loc
=
BufferIO
::
ReadInt8
(
pbuf
);
count
=
BufferIO
::
ReadInt8
(
pbuf
);
count
=
BufferIO
::
ReadInt8
(
pbuf
);
pbuf
+=
count
*
8
;
pbuf
+=
count
*
8
;
NetServer
::
SendBufferToPlayer
(
players
[
0
],
STOC_GAME_MSG
,
offset
,
pbuf
-
offset
);
NetServer
::
SendBufferToPlayer
(
players
[
0
],
STOC_GAME_MSG
,
offset
,
pbuf
-
offset
);
NetServer
::
ReSendToPlayer
(
players
[
1
]);
NetServer
::
ReSendToPlayer
(
players
[
1
]);
for
(
auto
oit
=
observers
.
begin
();
oit
!=
observers
.
end
();
++
oit
)
for
(
auto
oit
=
observers
.
begin
();
oit
!=
observers
.
end
();
++
oit
)
NetServer
::
ReSendToPlayer
(
*
oit
);
NetServer
::
ReSendToPlayer
(
*
oit
);
if
(
loc
==
LOCATION_MZONE
)
{
RefreshMzone
(
0
,
0x181fff
,
0
);
RefreshMzone
(
0
,
0x181fff
,
0
);
RefreshMzone
(
1
,
0x181fff
,
0
);
RefreshMzone
(
1
,
0x181fff
,
0
);
}
else
{
RefreshSzone
(
0
,
0x181fff
,
0
);
RefreshSzone
(
1
,
0x181fff
,
0
);
}
break
;
break
;
}
}
case
MSG_NEW_TURN
:
{
case
MSG_NEW_TURN
:
{
...
...
gframe/single_mode.cpp
View file @
48d84bcc
...
@@ -417,6 +417,7 @@ bool SingleMode::SinglePlayAnalyze(char* msg, unsigned int len) {
...
@@ -417,6 +417,7 @@ bool SingleMode::SinglePlayAnalyze(char* msg, unsigned int len) {
break
;
break
;
}
}
case
MSG_SHUFFLE_SET_CARD
:
{
case
MSG_SHUFFLE_SET_CARD
:
{
pbuf
++
;
count
=
BufferIO
::
ReadInt8
(
pbuf
);
count
=
BufferIO
::
ReadInt8
(
pbuf
);
pbuf
+=
count
*
8
;
pbuf
+=
count
*
8
;
DuelClient
::
ClientAnalyze
(
offset
,
pbuf
-
offset
);
DuelClient
::
ClientAnalyze
(
offset
,
pbuf
-
offset
);
...
...
gframe/tag_duel.cpp
View file @
48d84bcc
...
@@ -843,6 +843,7 @@ int TagDuel::Analyze(char* msgbuffer, unsigned int len) {
...
@@ -843,6 +843,7 @@ int TagDuel::Analyze(char* msgbuffer, unsigned int len) {
break
;
break
;
}
}
case
MSG_SHUFFLE_SET_CARD
:
{
case
MSG_SHUFFLE_SET_CARD
:
{
int
loc
=
BufferIO
::
ReadInt8
(
pbuf
);
count
=
BufferIO
::
ReadInt8
(
pbuf
);
count
=
BufferIO
::
ReadInt8
(
pbuf
);
pbuf
+=
count
*
8
;
pbuf
+=
count
*
8
;
NetServer
::
SendBufferToPlayer
(
players
[
0
],
STOC_GAME_MSG
,
offset
,
pbuf
-
offset
);
NetServer
::
SendBufferToPlayer
(
players
[
0
],
STOC_GAME_MSG
,
offset
,
pbuf
-
offset
);
...
@@ -851,8 +852,13 @@ int TagDuel::Analyze(char* msgbuffer, unsigned int len) {
...
@@ -851,8 +852,13 @@ int TagDuel::Analyze(char* msgbuffer, unsigned int len) {
NetServer
::
ReSendToPlayer
(
players
[
3
]);
NetServer
::
ReSendToPlayer
(
players
[
3
]);
for
(
auto
oit
=
observers
.
begin
();
oit
!=
observers
.
end
();
++
oit
)
for
(
auto
oit
=
observers
.
begin
();
oit
!=
observers
.
end
();
++
oit
)
NetServer
::
ReSendToPlayer
(
*
oit
);
NetServer
::
ReSendToPlayer
(
*
oit
);
if
(
loc
==
LOCATION_MZONE
)
{
RefreshMzone
(
0
,
0x181fff
,
0
);
RefreshMzone
(
0
,
0x181fff
,
0
);
RefreshMzone
(
1
,
0x181fff
,
0
);
RefreshMzone
(
1
,
0x181fff
,
0
);
}
else
{
RefreshSzone
(
0
,
0x181fff
,
0
);
RefreshSzone
(
1
,
0x181fff
,
0
);
}
break
;
break
;
}
}
case
MSG_NEW_TURN
:
{
case
MSG_NEW_TURN
:
{
...
...
ocgcore
@
9fb43bf0
Subproject commit
5484e52fd1a9e81c36101e0bb8e4e1e859368fe5
Subproject commit
9fb43bf0ef49641ba985b7b7a6666221acf5cf1e
premake4.lua
View file @
48d84bcc
...
@@ -2,11 +2,9 @@ solution "ygo"
...
@@ -2,11 +2,9 @@ solution "ygo"
location
"build"
location
"build"
language
"C++"
language
"C++"
objdir
"obj"
objdir
"obj"
startproject
"ygopro"
configurations
{
"
Debug"
,
"Release
"
}
configurations
{
"
Release"
,
"Debug
"
}
defines
{
"LUA_COMPAT_5_2"
}
defines
{
"LUA_COMPAT_5_2"
}
configuration
"windows"
configuration
"windows"
defines
{
"WIN32"
,
"_WIN32"
}
defines
{
"WIN32"
,
"_WIN32"
}
...
...
script
@
ace33ce3
Subproject commit
eadaf7e6d270095cc47c5980c6fc1de95cfce53
0
Subproject commit
ace33ce35cf778cb38fb187148c4ed58d63f846
0
textures/clock.png
0 → 100644
View file @
48d84bcc
3.41 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