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
cfb679f6
Commit
cfb679f6
authored
Oct 01, 2018
by
nanahira
Browse files
Options
Browse Files
Download
Plain Diff
merge
parents
37d2b048
0e259c14
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
41 additions
and
12 deletions
+41
-12
cards.cdb
cards.cdb
+0
-0
gframe/deck_con.cpp
gframe/deck_con.cpp
+3
-3
gframe/event_handler.cpp
gframe/event_handler.cpp
+3
-3
gframe/game.cpp
gframe/game.cpp
+28
-3
gframe/game.h
gframe/game.h
+1
-1
gframe/menu_handler.cpp
gframe/menu_handler.cpp
+1
-1
gframe/replay_mode.cpp
gframe/replay_mode.cpp
+1
-0
gframe/single_duel.cpp
gframe/single_duel.cpp
+1
-0
gframe/single_mode.cpp
gframe/single_mode.cpp
+2
-1
gframe/tag_duel.cpp
gframe/tag_duel.cpp
+1
-0
No files found.
cards.cdb
View file @
cfb679f6
No preview for this file type
gframe/deck_con.cpp
View file @
cfb679f6
...
@@ -63,7 +63,7 @@ void DeckBuilder::Initialize() {
...
@@ -63,7 +63,7 @@ void DeckBuilder::Initialize() {
mainGame
->
is_building
=
true
;
mainGame
->
is_building
=
true
;
mainGame
->
is_siding
=
false
;
mainGame
->
is_siding
=
false
;
mainGame
->
sidedeck_available
=
false
;
mainGame
->
sidedeck_available
=
false
;
mainGame
->
ShowCardNo
Info
();
mainGame
->
ClearCard
Info
();
mainGame
->
wInfos
->
setVisible
(
true
);
mainGame
->
wInfos
->
setVisible
(
true
);
mainGame
->
wCardImg
->
setVisible
(
true
);
mainGame
->
wCardImg
->
setVisible
(
true
);
mainGame
->
wDeckEdit
->
setVisible
(
true
);
mainGame
->
wDeckEdit
->
setVisible
(
true
);
...
@@ -93,7 +93,7 @@ void DeckBuilder::Initialize() {
...
@@ -93,7 +93,7 @@ void DeckBuilder::Initialize() {
}
}
void
DeckBuilder
::
Terminate
()
{
void
DeckBuilder
::
Terminate
()
{
mainGame
->
is_building
=
false
;
mainGame
->
is_building
=
false
;
mainGame
->
ShowCardNo
Info
();
mainGame
->
ClearCard
Info
();
mainGame
->
wDeckEdit
->
setVisible
(
false
);
mainGame
->
wDeckEdit
->
setVisible
(
false
);
mainGame
->
wCategories
->
setVisible
(
false
);
mainGame
->
wCategories
->
setVisible
(
false
);
mainGame
->
wFilter
->
setVisible
(
false
);
mainGame
->
wFilter
->
setVisible
(
false
);
...
@@ -278,7 +278,7 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
...
@@ -278,7 +278,7 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
mainGame
->
env
->
addMessageBox
(
L""
,
dataManager
.
GetSysString
(
1410
));
mainGame
->
env
->
addMessageBox
(
L""
,
dataManager
.
GetSysString
(
1410
));
break
;
break
;
}
}
mainGame
->
ShowCardNo
Info
();
mainGame
->
ClearCard
Info
();
mainGame
->
scrFilter
->
setVisible
(
false
);
mainGame
->
scrFilter
->
setVisible
(
false
);
char
deckbuf
[
1024
];
char
deckbuf
[
1024
];
char
*
pdeck
=
deckbuf
;
char
*
pdeck
=
deckbuf
;
...
...
gframe/event_handler.cpp
View file @
cfb679f6
...
@@ -982,7 +982,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
...
@@ -982,7 +982,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
if
(
mcard
->
code
)
{
if
(
mcard
->
code
)
{
mainGame
->
ShowCardInfo
(
mcard
->
code
);
mainGame
->
ShowCardInfo
(
mcard
->
code
);
}
else
{
}
else
{
mainGame
->
ShowCardNo
Info
(
mcard
->
controler
);
mainGame
->
ClearCard
Info
(
mcard
->
controler
);
}
}
}
}
if
(
id
>=
BUTTON_DISPLAY_0
&&
id
<=
BUTTON_DISPLAY_4
)
{
if
(
id
>=
BUTTON_DISPLAY_0
&&
id
<=
BUTTON_DISPLAY_4
)
{
...
@@ -991,7 +991,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
...
@@ -991,7 +991,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
if
(
mcard
->
code
)
{
if
(
mcard
->
code
)
{
mainGame
->
ShowCardInfo
(
mcard
->
code
);
mainGame
->
ShowCardInfo
(
mcard
->
code
);
}
else
{
}
else
{
mainGame
->
ShowCardNo
Info
(
mcard
->
controler
);
mainGame
->
ClearCard
Info
(
mcard
->
controler
);
}
}
}
}
break
;
break
;
...
@@ -1567,7 +1567,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
...
@@ -1567,7 +1567,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
}
}
}
else
{
}
else
{
should_show_tip
=
false
;
should_show_tip
=
false
;
mainGame
->
ShowCardNo
Info
(
mcard
->
controler
);
mainGame
->
ClearCard
Info
(
mcard
->
controler
);
}
}
}
}
hovered_card
=
mcard
;
hovered_card
=
mcard
;
...
...
gframe/game.cpp
View file @
cfb679f6
...
@@ -1409,7 +1409,32 @@ void Game::LoadConfig() {
...
@@ -1409,7 +1409,32 @@ void Game::LoadConfig() {
}
}
fclose
(
fp_user
);
fclose
(
fp_user
);
}
else
{
}
else
{
SaveConfig
();
#ifdef _WIN32
unsigned
int
lcid
=
((
unsigned
int
)
GetSystemDefaultLangID
())
&
0xff
;
switch
(
lcid
)
{
case
0x04
:
{
myswprintf
(
mainGame
->
gameConf
.
locale
,
L"%ls"
,
L"zh-CN"
);
break
;
}
case
0x09
:
{
myswprintf
(
mainGame
->
gameConf
.
locale
,
L"%ls"
,
L"en-US"
);
break
;
}
case
0x0a
:
{
myswprintf
(
mainGame
->
gameConf
.
locale
,
L"%ls"
,
L"es-ES"
);
break
;
}
case
0x11
:
{
myswprintf
(
mainGame
->
gameConf
.
locale
,
L"%ls"
,
L"ja-JP"
);
break
;
}
case
0x12
:
{
myswprintf
(
mainGame
->
gameConf
.
locale
,
L"%ls"
,
L"ko-KR"
);
break
;
}
}
#endif
//SaveConfig();
}
}
#endif //YGOPRO_COMPAT_MYCARD
#endif //YGOPRO_COMPAT_MYCARD
}
}
...
@@ -1420,7 +1445,7 @@ void Game::SaveConfig() {
...
@@ -1420,7 +1445,7 @@ void Game::SaveConfig() {
FILE
*
fp
=
fopen
(
"system_user.conf"
,
"w"
);
FILE
*
fp
=
fopen
(
"system_user.conf"
,
"w"
);
#endif //YGOPRO_COMPAT_MYCARD
#endif //YGOPRO_COMPAT_MYCARD
fprintf
(
fp
,
"#config file
\n
#nickname & gamename should be less than 20 characters
\n
"
);
fprintf
(
fp
,
"#config file
\n
#nickname & gamename should be less than 20 characters
\n
"
);
char
linebuf
[
256
];
char
linebuf
[
512
];
fprintf
(
fp
,
"use_d3d = %d
\n
"
,
gameConf
.
use_d3d
?
1
:
0
);
fprintf
(
fp
,
"use_d3d = %d
\n
"
,
gameConf
.
use_d3d
?
1
:
0
);
fprintf
(
fp
,
"use_image_scale = %d
\n
"
,
gameConf
.
use_image_scale
?
1
:
0
);
fprintf
(
fp
,
"use_image_scale = %d
\n
"
,
gameConf
.
use_image_scale
?
1
:
0
);
fprintf
(
fp
,
"pro_version = %d
\n
"
,
PRO_VERSION
);
fprintf
(
fp
,
"pro_version = %d
\n
"
,
PRO_VERSION
);
...
@@ -1568,7 +1593,7 @@ void Game::ShowCardInfo(int code, bool resize) {
...
@@ -1568,7 +1593,7 @@ void Game::ShowCardInfo(int code, bool resize) {
const
auto
&
tsize
=
stText
->
getRelativePosition
();
const
auto
&
tsize
=
stText
->
getRelativePosition
();
InitStaticText
(
stText
,
tsize
.
getWidth
(),
tsize
.
getHeight
(),
guiFont
,
showingtext
);
InitStaticText
(
stText
,
tsize
.
getWidth
(),
tsize
.
getHeight
(),
guiFont
,
showingtext
);
}
}
void
Game
::
ShowCardNo
Info
(
int
player
)
{
void
Game
::
ClearCard
Info
(
int
player
)
{
imgCard
->
setImage
(
imageManager
.
tCover
[
player
]);
imgCard
->
setImage
(
imageManager
.
tCover
[
player
]);
showingcode
=
0
;
showingcode
=
0
;
stName
->
setText
(
L""
);
stName
->
setText
(
L""
);
...
...
gframe/game.h
View file @
cfb679f6
...
@@ -151,7 +151,7 @@ public:
...
@@ -151,7 +151,7 @@ public:
void
LoadConfig
();
void
LoadConfig
();
void
SaveConfig
();
void
SaveConfig
();
void
ShowCardInfo
(
int
code
,
bool
resize
=
false
);
void
ShowCardInfo
(
int
code
,
bool
resize
=
false
);
void
ShowCardNo
Info
(
int
player
=
0
);
void
ClearCard
Info
(
int
player
=
0
);
void
AddChatMsg
(
wchar_t
*
msg
,
int
player
);
void
AddChatMsg
(
wchar_t
*
msg
,
int
player
);
void
ClearChatMsg
();
void
ClearChatMsg
();
void
AddDebugMsg
(
char
*
msgbuf
);
void
AddDebugMsg
(
char
*
msgbuf
);
...
...
gframe/menu_handler.cpp
View file @
cfb679f6
...
@@ -222,7 +222,7 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) {
...
@@ -222,7 +222,7 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) {
if
(
!
ReplayMode
::
cur_replay
.
OpenReplay
(
mainGame
->
lstReplayList
->
getListItem
(
mainGame
->
lstReplayList
->
getSelected
())))
if
(
!
ReplayMode
::
cur_replay
.
OpenReplay
(
mainGame
->
lstReplayList
->
getListItem
(
mainGame
->
lstReplayList
->
getSelected
())))
break
;
break
;
}
}
mainGame
->
ShowCardNo
Info
();
mainGame
->
ClearCard
Info
();
mainGame
->
wCardImg
->
setVisible
(
true
);
mainGame
->
wCardImg
->
setVisible
(
true
);
mainGame
->
wInfos
->
setVisible
(
true
);
mainGame
->
wInfos
->
setVisible
(
true
);
mainGame
->
wReplay
->
setVisible
(
true
);
mainGame
->
wReplay
->
setVisible
(
true
);
...
...
gframe/replay_mode.cpp
View file @
cfb679f6
...
@@ -157,6 +157,7 @@ bool ReplayMode::StartDuel() {
...
@@ -157,6 +157,7 @@ bool ReplayMode::StartDuel() {
}
}
pduel
=
create_duel
(
rnd
.
rand
());
pduel
=
create_duel
(
rnd
.
rand
());
preload_script
(
pduel
,
"./script/special.lua"
,
0
);
preload_script
(
pduel
,
"./script/special.lua"
,
0
);
preload_script
(
pduel
,
"./script/init.lua"
,
0
);
int
start_lp
=
cur_replay
.
ReadInt32
();
int
start_lp
=
cur_replay
.
ReadInt32
();
int
start_hand
=
cur_replay
.
ReadInt32
();
int
start_hand
=
cur_replay
.
ReadInt32
();
int
draw_count
=
cur_replay
.
ReadInt32
();
int
draw_count
=
cur_replay
.
ReadInt32
();
...
...
gframe/single_duel.cpp
View file @
cfb679f6
...
@@ -414,6 +414,7 @@ void SingleDuel::TPResult(DuelPlayer* dp, unsigned char tp) {
...
@@ -414,6 +414,7 @@ void SingleDuel::TPResult(DuelPlayer* dp, unsigned char tp) {
rnd
.
reset
(
seed
);
rnd
.
reset
(
seed
);
pduel
=
create_duel
(
rnd
.
rand
());
pduel
=
create_duel
(
rnd
.
rand
());
preload_script
(
pduel
,
"./script/special.lua"
,
0
);
preload_script
(
pduel
,
"./script/special.lua"
,
0
);
preload_script
(
pduel
,
"./script/init.lua"
,
0
);
set_player_info
(
pduel
,
0
,
host_info
.
start_lp
,
host_info
.
start_hand
,
host_info
.
draw_count
);
set_player_info
(
pduel
,
0
,
host_info
.
start_lp
,
host_info
.
start_hand
,
host_info
.
draw_count
);
set_player_info
(
pduel
,
1
,
host_info
.
start_lp
,
host_info
.
start_hand
,
host_info
.
draw_count
);
set_player_info
(
pduel
,
1
,
host_info
.
start_lp
,
host_info
.
start_hand
,
host_info
.
draw_count
);
int
opt
=
(
int
)
host_info
.
duel_rule
<<
16
;
int
opt
=
(
int
)
host_info
.
duel_rule
<<
16
;
...
...
gframe/single_mode.cpp
View file @
cfb679f6
...
@@ -43,6 +43,7 @@ int SingleMode::SinglePlayThread(void* param) {
...
@@ -43,6 +43,7 @@ int SingleMode::SinglePlayThread(void* param) {
set_message_handler
((
message_handler
)
MessageHandler
);
set_message_handler
((
message_handler
)
MessageHandler
);
pduel
=
create_duel
(
rnd
.
rand
());
pduel
=
create_duel
(
rnd
.
rand
());
preload_script
(
pduel
,
"./script/special.lua"
,
0
);
preload_script
(
pduel
,
"./script/special.lua"
,
0
);
preload_script
(
pduel
,
"./script/init.lua"
,
0
);
set_player_info
(
pduel
,
0
,
start_lp
,
start_hand
,
draw_count
);
set_player_info
(
pduel
,
0
,
start_lp
,
start_hand
,
draw_count
);
set_player_info
(
pduel
,
1
,
start_lp
,
start_hand
,
draw_count
);
set_player_info
(
pduel
,
1
,
start_lp
,
start_hand
,
draw_count
);
mainGame
->
dInfo
.
lp
[
0
]
=
start_lp
;
mainGame
->
dInfo
.
lp
[
0
]
=
start_lp
;
...
@@ -87,7 +88,7 @@ int SingleMode::SinglePlayThread(void* param) {
...
@@ -87,7 +88,7 @@ int SingleMode::SinglePlayThread(void* param) {
rh
.
seed
=
seed
;
rh
.
seed
=
seed
;
mainGame
->
gMutex
.
Lock
();
mainGame
->
gMutex
.
Lock
();
mainGame
->
HideElement
(
mainGame
->
wSinglePlay
);
mainGame
->
HideElement
(
mainGame
->
wSinglePlay
);
mainGame
->
ShowCardNo
Info
();
mainGame
->
ClearCard
Info
();
mainGame
->
wCardImg
->
setVisible
(
true
);
mainGame
->
wCardImg
->
setVisible
(
true
);
mainGame
->
wInfos
->
setVisible
(
true
);
mainGame
->
wInfos
->
setVisible
(
true
);
mainGame
->
btnLeaveGame
->
setVisible
(
true
);
mainGame
->
btnLeaveGame
->
setVisible
(
true
);
...
...
gframe/tag_duel.cpp
View file @
cfb679f6
...
@@ -389,6 +389,7 @@ void TagDuel::TPResult(DuelPlayer* dp, unsigned char tp) {
...
@@ -389,6 +389,7 @@ void TagDuel::TPResult(DuelPlayer* dp, unsigned char tp) {
rnd
.
reset
(
seed
);
rnd
.
reset
(
seed
);
pduel
=
create_duel
(
rnd
.
rand
());
pduel
=
create_duel
(
rnd
.
rand
());
preload_script
(
pduel
,
"./script/special.lua"
,
0
);
preload_script
(
pduel
,
"./script/special.lua"
,
0
);
preload_script
(
pduel
,
"./script/init.lua"
,
0
);
set_player_info
(
pduel
,
0
,
host_info
.
start_lp
,
host_info
.
start_hand
,
host_info
.
draw_count
);
set_player_info
(
pduel
,
0
,
host_info
.
start_lp
,
host_info
.
start_hand
,
host_info
.
draw_count
);
set_player_info
(
pduel
,
1
,
host_info
.
start_lp
,
host_info
.
start_hand
,
host_info
.
draw_count
);
set_player_info
(
pduel
,
1
,
host_info
.
start_lp
,
host_info
.
start_hand
,
host_info
.
draw_count
);
int
opt
=
(
int
)
host_info
.
duel_rule
<<
16
;
int
opt
=
(
int
)
host_info
.
duel_rule
<<
16
;
...
...
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