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
f4a94109
Commit
f4a94109
authored
Nov 11, 2018
by
mercury233
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'resize' into test
parents
d63d3e08
b93c8175
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
20 additions
and
14 deletions
+20
-14
gframe/client_card.cpp
gframe/client_card.cpp
+2
-0
gframe/duelclient.cpp
gframe/duelclient.cpp
+5
-5
gframe/event_handler.cpp
gframe/event_handler.cpp
+7
-3
gframe/game.cpp
gframe/game.cpp
+4
-4
gframe/single_mode.cpp
gframe/single_mode.cpp
+1
-1
gframe/sound_manager.cpp
gframe/sound_manager.cpp
+1
-1
No files found.
gframe/client_card.cpp
View file @
f4a94109
...
...
@@ -125,6 +125,8 @@ void ClientCard::UpdateInfo(char* buf) {
base_defense
=
BufferIO
::
ReadInt32
(
buf
);
if
(
flag
&
QUERY_REASON
)
reason
=
BufferIO
::
ReadInt32
(
buf
);
if
(
flag
&
QUERY_REASON_CARD
)
BufferIO
::
ReadInt32
(
buf
);
if
(
flag
&
QUERY_EQUIP_CARD
)
{
int
c
=
BufferIO
::
ReadInt8
(
buf
);
int
l
=
BufferIO
::
ReadInt8
(
buf
);
...
...
gframe/duelclient.cpp
View file @
f4a94109
...
...
@@ -944,7 +944,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
mainGame
->
lstLog
->
addItem
(
textBuffer
);
mainGame
->
logParam
.
push_back
(
0
);
mainGame
->
gMutex
.
Lock
();
mainGame
->
SetStaticText
(
mainGame
->
stACMessage
,
310
,
mainGame
->
text
Font
,
textBuffer
);
mainGame
->
SetStaticText
(
mainGame
->
stACMessage
,
310
,
mainGame
->
gui
Font
,
textBuffer
);
mainGame
->
PopupElement
(
mainGame
->
wACMessage
,
20
);
mainGame
->
gMutex
.
Unlock
();
mainGame
->
WaitFrameSignal
(
40
);
...
...
@@ -962,7 +962,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
mainGame
->
lstLog
->
addItem
(
textBuffer
);
mainGame
->
logParam
.
push_back
(
0
);
mainGame
->
gMutex
.
Lock
();
mainGame
->
SetStaticText
(
mainGame
->
stACMessage
,
310
,
mainGame
->
text
Font
,
textBuffer
);
mainGame
->
SetStaticText
(
mainGame
->
stACMessage
,
310
,
mainGame
->
gui
Font
,
textBuffer
);
mainGame
->
PopupElement
(
mainGame
->
wACMessage
,
20
);
mainGame
->
gMutex
.
Unlock
();
mainGame
->
WaitFrameSignal
(
40
);
...
...
@@ -973,7 +973,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
mainGame
->
lstLog
->
addItem
(
textBuffer
);
mainGame
->
logParam
.
push_back
(
0
);
mainGame
->
gMutex
.
Lock
();
mainGame
->
SetStaticText
(
mainGame
->
stACMessage
,
310
,
mainGame
->
text
Font
,
textBuffer
);
mainGame
->
SetStaticText
(
mainGame
->
stACMessage
,
310
,
mainGame
->
gui
Font
,
textBuffer
);
mainGame
->
PopupElement
(
mainGame
->
wACMessage
,
20
);
mainGame
->
gMutex
.
Unlock
();
mainGame
->
WaitFrameSignal
(
40
);
...
...
@@ -984,7 +984,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
mainGame
->
lstLog
->
addItem
(
textBuffer
);
mainGame
->
logParam
.
push_back
(
data
);
mainGame
->
gMutex
.
Lock
();
mainGame
->
SetStaticText
(
mainGame
->
stACMessage
,
310
,
mainGame
->
text
Font
,
textBuffer
);
mainGame
->
SetStaticText
(
mainGame
->
stACMessage
,
310
,
mainGame
->
gui
Font
,
textBuffer
);
mainGame
->
PopupElement
(
mainGame
->
wACMessage
,
20
);
mainGame
->
gMutex
.
Unlock
();
mainGame
->
WaitFrameSignal
(
40
);
...
...
@@ -995,7 +995,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
mainGame
->
lstLog
->
addItem
(
textBuffer
);
mainGame
->
logParam
.
push_back
(
0
);
mainGame
->
gMutex
.
Lock
();
mainGame
->
SetStaticText
(
mainGame
->
stACMessage
,
310
,
mainGame
->
text
Font
,
textBuffer
);
mainGame
->
SetStaticText
(
mainGame
->
stACMessage
,
310
,
mainGame
->
gui
Font
,
textBuffer
);
mainGame
->
PopupElement
(
mainGame
->
wACMessage
,
20
);
mainGame
->
gMutex
.
Unlock
();
mainGame
->
WaitFrameSignal
(
40
);
...
...
gframe/event_handler.cpp
View file @
f4a94109
...
...
@@ -1630,7 +1630,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
str
.
append
(
formatBuffer
);
}
should_show_tip
=
true
;
irr
::
core
::
dimension2d
<
unsigned
int
>
dtip
=
mainGame
->
text
Font
->
getDimension
(
str
.
c_str
())
+
irr
::
core
::
dimension2d
<
unsigned
int
>
(
10
,
10
);
irr
::
core
::
dimension2d
<
unsigned
int
>
dtip
=
mainGame
->
gui
Font
->
getDimension
(
str
.
c_str
())
+
irr
::
core
::
dimension2d
<
unsigned
int
>
(
10
,
10
);
mainGame
->
stTip
->
setRelativePosition
(
recti
(
mousepos
.
X
-
10
-
dtip
.
Width
,
mousepos
.
Y
+
10
,
mousepos
.
X
-
10
,
mousepos
.
Y
+
10
+
dtip
.
Height
));
mainGame
->
stTip
->
setText
(
str
.
c_str
());
}
...
...
@@ -1953,15 +1953,19 @@ bool ClientField::OnCommonEvent(const irr::SEvent& event) {
switch
(
event
.
KeyInput
.
Key
)
{
case
irr
:
:
KEY_KEY_R
:
{
if
(
mainGame
->
gameConf
.
control_mode
==
0
&&
!
event
.
KeyInput
.
PressedDown
&&
!
mainGame
->
HasFocus
(
EGUIET_EDIT_BOX
))
&&
!
event
.
KeyInput
.
PressedDown
&&
!
mainGame
->
HasFocus
(
EGUIET_EDIT_BOX
))
{
mainGame
->
textFont
->
setTransparency
(
true
);
mainGame
->
guiFont
->
setTransparency
(
true
);
}
return
true
;
break
;
}
case
irr
:
:
KEY_F9
:
{
if
(
mainGame
->
gameConf
.
control_mode
==
1
&&
!
event
.
KeyInput
.
PressedDown
&&
!
mainGame
->
HasFocus
(
EGUIET_EDIT_BOX
))
&&
!
event
.
KeyInput
.
PressedDown
&&
!
mainGame
->
HasFocus
(
EGUIET_EDIT_BOX
))
{
mainGame
->
textFont
->
setTransparency
(
true
);
mainGame
->
guiFont
->
setTransparency
(
true
);
}
return
true
;
break
;
}
...
...
gframe/game.cpp
View file @
f4a94109
...
...
@@ -932,7 +932,7 @@ void Game::SetStaticText(irr::gui::IGUIStaticText* pControl, u32 cWidth, irr::gu
}
void
Game
::
LoadExpansionDB
()
{
FileSystem
::
TraversalDir
(
"./expansions"
,
[](
const
char
*
name
,
bool
isdir
)
{
if
(
!
isdir
&&
!
mystrncasecmp
(
strrchr
(
name
,
'.'
),
".cdb"
,
4
))
{
if
(
!
isdir
&&
strrchr
(
name
,
'.'
)
&&
!
mystrncasecmp
(
strrchr
(
name
,
'.'
),
".cdb"
,
4
))
{
char
fpath
[
1024
];
sprintf
(
fpath
,
"./expansions/%s"
,
name
);
dataManager
.
LoadDB
(
fpath
);
...
...
@@ -942,7 +942,7 @@ void Game::LoadExpansionDB() {
void
Game
::
RefreshDeck
(
irr
::
gui
::
IGUIComboBox
*
cbDeck
)
{
cbDeck
->
clear
();
FileSystem
::
TraversalDir
(
L"./deck"
,
[
cbDeck
](
const
wchar_t
*
name
,
bool
isdir
)
{
if
(
!
isdir
&&
!
mywcsncasecmp
(
wcsrchr
(
name
,
'.'
),
L".ydk"
,
4
))
{
if
(
!
isdir
&&
wcsrchr
(
name
,
'.'
)
&&
!
mywcsncasecmp
(
wcsrchr
(
name
,
'.'
),
L".ydk"
,
4
))
{
size_t
len
=
wcslen
(
name
);
wchar_t
deckname
[
256
];
wcsncpy
(
deckname
,
name
,
len
-
4
);
...
...
@@ -960,14 +960,14 @@ void Game::RefreshDeck(irr::gui::IGUIComboBox* cbDeck) {
void
Game
::
RefreshReplay
()
{
lstReplayList
->
clear
();
FileSystem
::
TraversalDir
(
L"./replay"
,
[
this
](
const
wchar_t
*
name
,
bool
isdir
)
{
if
(
!
isdir
&&
!
mywcsncasecmp
(
wcsrchr
(
name
,
'.'
),
L".yrp"
,
4
)
&&
Replay
::
CheckReplay
(
name
))
if
(
!
isdir
&&
wcsrchr
(
name
,
'.'
)
&&
!
mywcsncasecmp
(
wcsrchr
(
name
,
'.'
),
L".yrp"
,
4
)
&&
Replay
::
CheckReplay
(
name
))
lstReplayList
->
addItem
(
name
);
});
}
void
Game
::
RefreshSingleplay
()
{
lstSinglePlayList
->
clear
();
FileSystem
::
TraversalDir
(
L"./single"
,
[
this
](
const
wchar_t
*
name
,
bool
isdir
)
{
if
(
!
isdir
&&
!
mywcsncasecmp
(
wcsrchr
(
name
,
'.'
),
L".lua"
,
4
))
if
(
!
isdir
&&
wcsrchr
(
name
,
'.'
)
&&
!
mywcsncasecmp
(
wcsrchr
(
name
,
'.'
),
L".lua"
,
4
))
lstSinglePlayList
->
addItem
(
name
);
});
}
...
...
gframe/single_mode.cpp
View file @
f4a94109
...
...
@@ -772,7 +772,7 @@ bool SingleMode::SinglePlayAnalyze(char* msg, unsigned int len) {
memcpy
(
msgbuf
,
begin
,
len
+
1
);
BufferIO
::
DecodeUTF8
(
msgbuf
,
msg
);
mainGame
->
gMutex
.
Lock
();
mainGame
->
SetStaticText
(
mainGame
->
stMessage
,
310
,
mainGame
->
text
Font
,
msg
);
mainGame
->
SetStaticText
(
mainGame
->
stMessage
,
310
,
mainGame
->
gui
Font
,
msg
);
mainGame
->
PopupElement
(
mainGame
->
wMessage
);
mainGame
->
gMutex
.
Unlock
();
mainGame
->
actionSignal
.
Reset
();
...
...
gframe/sound_manager.cpp
View file @
f4a94109
...
...
@@ -38,7 +38,7 @@ void SoundManager::RefreshBGMList() {
void
SoundManager
::
RefershBGMDir
(
std
::
wstring
path
,
int
scene
)
{
std
::
wstring
search
=
L"./sound/BGM/"
+
path
;
FileSystem
::
TraversalDir
(
search
.
c_str
(),
[
this
,
&
path
,
scene
](
const
wchar_t
*
name
,
bool
isdir
)
{
if
(
!
isdir
&&
(
!
mywcsncasecmp
(
wcsrchr
(
name
,
'.'
),
L".mp3"
,
4
)
||
!
mywcsncasecmp
(
wcsrchr
(
name
,
'.'
),
L".ogg"
,
4
)))
{
if
(
!
isdir
&&
wcsrchr
(
name
,
'.'
)
&&
(
!
mywcsncasecmp
(
wcsrchr
(
name
,
'.'
),
L".mp3"
,
4
)
||
!
mywcsncasecmp
(
wcsrchr
(
name
,
'.'
),
L".ogg"
,
4
)))
{
std
::
wstring
filename
=
path
+
L"/"
+
name
;
BGMList
[
BGM_ALL
].
push_back
(
filename
);
BGMList
[
scene
].
push_back
(
filename
);
...
...
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