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
YGOPRO-520DIY
ygopro
Commits
8f01a44d
Commit
8f01a44d
authored
Feb 15, 2025
by
wind2009
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'upstream/master' into develop
parents
86d54745
db97241d
Changes
19
Show whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
37 additions
and
39 deletions
+37
-39
gframe/client_field.cpp
gframe/client_field.cpp
+7
-7
gframe/client_field.h
gframe/client_field.h
+2
-2
gframe/config.h
gframe/config.h
+0
-1
gframe/data_manager.h
gframe/data_manager.h
+1
-1
gframe/deck_con.cpp
gframe/deck_con.cpp
+4
-5
gframe/deck_con.h
gframe/deck_con.h
+1
-1
gframe/duelclient.cpp
gframe/duelclient.cpp
+1
-2
gframe/game.cpp
gframe/game.cpp
+4
-5
gframe/game.h
gframe/game.h
+1
-1
gframe/menu_handler.cpp
gframe/menu_handler.cpp
+1
-2
gframe/menu_handler.h
gframe/menu_handler.h
+1
-1
gframe/myfilesystem.h
gframe/myfilesystem.h
+2
-2
gframe/single_duel.cpp
gframe/single_duel.cpp
+1
-1
gframe/single_mode.cpp
gframe/single_mode.cpp
+3
-4
gframe/sound_manager.cpp
gframe/sound_manager.cpp
+1
-1
gframe/tag_duel.cpp
gframe/tag_duel.cpp
+1
-1
ocgcore
ocgcore
+1
-1
script
script
+1
-1
strings.conf
strings.conf
+4
-0
No files found.
gframe/client_field.cpp
View file @
8f01a44d
...
...
@@ -235,7 +235,7 @@ void ClientField::AddCard(ClientCard* pcard, int controler, int location, int se
extra
[
controler
].
push_back
(
pcard
);
pcard
->
sequence
=
(
unsigned
char
)(
extra
[
controler
].
size
()
-
1
);
}
else
{
int
p
=
extra
[
controler
].
size
()
-
extra_p_count
[
controler
]
-
1
;
int
p
=
extra
[
controler
].
size
()
-
extra_p_count
[
controler
];
for
(
int
i
=
extra
[
controler
].
size
()
-
1
;
i
>
p
;
--
i
)
{
extra
[
controler
][
i
]
->
sequence
++
;
extra
[
controler
][
i
]
->
curPos
+=
irr
::
core
::
vector3df
(
0
,
0
,
0.01
f
);
...
...
@@ -1184,13 +1184,13 @@ bool ClientField::CheckSelectSum() {
if
(
select_mode
==
0
)
{
// sum equal
bool
ret
=
check_sel_sum_s
(
selable
,
0
,
select_sumval
);
selectable_cards
.
clear
();
for
(
auto
sc
:
selected_cards
)
{
selectable_cards
.
push_back
(
sc
);
}
for
(
auto
sc
:
selectsum_cards
)
{
sc
->
is_selectable
=
true
;
selectable_cards
.
push_back
(
sc
);
}
for
(
auto
sc
:
selected_cards
)
{
selectable_cards
.
push_back
(
sc
);
}
return
ret
;
}
else
{
// sum greater
int
mm
=
-
1
,
mx
=
-
1
,
max
=
0
,
sumc
=
0
;
...
...
@@ -1248,13 +1248,13 @@ bool ClientField::CheckSelectSum() {
}
}
selectable_cards
.
clear
();
for
(
auto
sc
:
selected_cards
)
{
selectable_cards
.
push_back
(
sc
);
}
for
(
auto
sc
:
selectsum_cards
)
{
sc
->
is_selectable
=
true
;
selectable_cards
.
push_back
(
sc
);
}
for
(
auto
sc
:
selected_cards
)
{
selectable_cards
.
push_back
(
sc
);
}
return
ret
;
}
}
...
...
gframe/client_field.h
View file @
8f01a44d
...
...
@@ -144,8 +144,8 @@ public:
ClientCard
*
menu_card
{
nullptr
};
int
list_command
{
0
};
virtual
bool
OnEvent
(
const
irr
::
SEvent
&
event
)
;
virtual
bool
OnCommonEvent
(
const
irr
::
SEvent
&
event
);
bool
OnEvent
(
const
irr
::
SEvent
&
event
)
override
;
bool
OnCommonEvent
(
const
irr
::
SEvent
&
event
);
void
GetHoverField
(
int
x
,
int
y
);
void
ShowMenu
(
int
flag
,
int
x
,
int
y
);
void
HideMenu
();
...
...
gframe/config.h
View file @
8f01a44d
...
...
@@ -50,7 +50,6 @@
#include <string>
#include "bufferio.h"
#include "../ocgcore/ocgapi.h"
#include "../ocgcore/common.h"
template
<
size_t
N
,
typename
...
TR
>
inline
int
myswprintf
(
wchar_t
(
&
buf
)[
N
],
const
wchar_t
*
fmt
,
TR
...
args
)
{
...
...
gframe/data_manager.h
View file @
8f01a44d
...
...
@@ -24,7 +24,7 @@ struct CardDataC : card_data {
uint32_t
ot
{};
uint32_t
category
{};
bool
is_setcodes
(
std
::
vector
<
uint32_t
>
values
)
const
{
bool
is_setcodes
(
const
std
::
vector
<
unsigned
int
>&
values
)
const
{
for
(
auto
&
value
:
values
)
{
if
(
is_setcode
(
value
))
return
true
;
...
...
gframe/deck_con.cpp
View file @
8f01a44d
...
...
@@ -63,7 +63,7 @@ void DeckBuilder::Initialize() {
mainGame
->
btnSideReload
->
setVisible
(
false
);
filterList
=
&
deckManager
.
_lfList
[
mainGame
->
gameConf
.
use_lflist
?
mainGame
->
gameConf
.
default_lflist
:
deckManager
.
_lfList
.
size
()
-
1
].
content
;
ClearSearch
();
rnd
.
reset
((
uint_fast32_t
)
time
(
nullptr
));
rnd
.
reset
((
uint_fast32_t
)
std
::
time
(
nullptr
));
mouse_pos
.
set
(
0
,
0
);
hovered_code
=
0
;
hovered_pos
=
0
;
...
...
@@ -1343,13 +1343,12 @@ void DeckBuilder::FilterCards() {
all
,
name
,
setcode
}
type
;
bool
exclude
;
element_t
()
:
type
(
type_t
::
all
),
exclude
(
false
)
{}
}
type
{
type_t
::
all
};
bool
exclude
{
false
};
};
const
wchar_t
*
pstr
=
mainGame
->
ebCardName
->
getText
();
int
trycode
=
BufferIO
::
GetVal
(
pstr
);
std
::
wstring
str
=
std
::
wstring
(
pstr
)
;
std
::
wstring
str
{
pstr
}
;
std
::
vector
<
element_t
>
query_elements
;
if
(
mainGame
->
gameConf
.
search_multiple_keywords
)
{
const
wchar_t
separator
=
mainGame
->
gameConf
.
search_multiple_keywords
==
1
?
L' '
:
L'+'
;
...
...
gframe/deck_con.h
View file @
8f01a44d
...
...
@@ -11,7 +11,7 @@ namespace ygo {
class
DeckBuilder
:
public
irr
::
IEventReceiver
{
public:
virtual
bool
OnEvent
(
const
irr
::
SEvent
&
event
)
;
bool
OnEvent
(
const
irr
::
SEvent
&
event
)
override
;
void
Initialize
();
void
Terminate
();
void
GetHoveredCard
();
...
...
gframe/duelclient.cpp
View file @
8f01a44d
...
...
@@ -730,9 +730,8 @@ void DuelClient::HandleSTOCPacketLan(unsigned char* data, int len) {
else
starttime
=
new_replay
.
pheader
.
seed
;
tm
*
localedtime
=
localtime
(
&
starttime
);
wchar_t
timetext
[
40
];
std
::
wcsftime
(
timetext
,
40
,
L"%Y-%m-%d %H-%M-%S"
,
localedtime
);
std
::
wcsftime
(
timetext
,
sizeof
timetext
/
sizeof
timetext
[
0
],
L"%Y-%m-%d %H-%M-%S"
,
std
::
localtime
(
&
starttime
)
);
mainGame
->
ebRSName
->
setText
(
timetext
);
if
(
!
mainGame
->
chkAutoSaveReplay
->
isChecked
())
{
mainGame
->
wReplaySave
->
setText
(
dataManager
.
GetSysString
(
1340
));
...
...
gframe/game.cpp
View file @
8f01a44d
...
...
@@ -1746,10 +1746,9 @@ void Game::ErrorLog(const char* msg) {
FILE
*
fp
=
fopen
(
"error.log"
,
"at"
);
if
(
!
fp
)
return
;
time_t
nowtime
=
time
(
nullptr
);
tm
*
localedtime
=
localtime
(
&
nowtime
);
time_t
nowtime
=
std
::
time
(
nullptr
);
char
timebuf
[
40
];
st
rftime
(
timebuf
,
40
,
"%Y-%m-%d %H:%M:%S"
,
localedtime
);
st
d
::
strftime
(
timebuf
,
sizeof
timebuf
,
"%Y-%m-%d %H:%M:%S"
,
std
::
localtime
(
&
nowtime
)
);
fprintf
(
fp
,
"[%s]%s
\n
"
,
timebuf
,
msg
);
fclose
(
fp
);
}
...
...
@@ -2153,8 +2152,8 @@ void Game::SetWindowsIcon() {
HINSTANCE
hInstance
=
(
HINSTANCE
)
GetModuleHandleW
(
nullptr
);
HICON
hSmallIcon
=
(
HICON
)
LoadImageW
(
hInstance
,
MAKEINTRESOURCEW
(
1
),
IMAGE_ICON
,
16
,
16
,
LR_DEFAULTCOLOR
);
HICON
hBigIcon
=
(
HICON
)
LoadImageW
(
hInstance
,
MAKEINTRESOURCEW
(
1
),
IMAGE_ICON
,
32
,
32
,
LR_DEFAULTCOLOR
);
SendMessageW
(
hWnd
,
WM_SETICON
,
ICON_SMALL
,
(
long
)
hSmallIcon
);
SendMessageW
(
hWnd
,
WM_SETICON
,
ICON_BIG
,
(
long
)
hBigIcon
);
SendMessageW
(
hWnd
,
WM_SETICON
,
ICON_SMALL
,
(
LPARAM
)
hSmallIcon
);
SendMessageW
(
hWnd
,
WM_SETICON
,
ICON_BIG
,
(
LPARAM
)
hBigIcon
);
#endif
}
void
Game
::
SetWindowsScale
(
float
scale
)
{
...
...
gframe/game.h
View file @
8f01a44d
...
...
@@ -15,7 +15,7 @@
#include "client_field.h"
#include "deck_con.h"
#include "menu_handler.h"
#include <
time.h
>
#include <
ctime
>
#include <unordered_map>
#include <vector>
#include <list>
...
...
gframe/menu_handler.cpp
View file @
8f01a44d
...
...
@@ -556,8 +556,7 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) {
curtime
=
ReplayMode
::
cur_replay
.
pheader
.
start_time
;
else
curtime
=
ReplayMode
::
cur_replay
.
pheader
.
seed
;
tm
*
st
=
localtime
(
&
curtime
);
std
::
wcsftime
(
infobuf
,
256
,
L"%Y/%m/%d %H:%M:%S
\n
"
,
st
);
std
::
wcsftime
(
infobuf
,
sizeof
infobuf
/
sizeof
infobuf
[
0
],
L"%Y/%m/%d %H:%M:%S
\n
"
,
std
::
localtime
(
&
curtime
));
repinfo
.
append
(
infobuf
);
wchar_t
namebuf
[
4
][
20
]{};
ReplayMode
::
cur_replay
.
ReadName
(
namebuf
[
0
]);
...
...
gframe/menu_handler.h
View file @
8f01a44d
...
...
@@ -7,7 +7,7 @@ namespace ygo {
class
MenuHandler
:
public
irr
::
IEventReceiver
{
public:
virtual
bool
OnEvent
(
const
irr
::
SEvent
&
event
)
;
bool
OnEvent
(
const
irr
::
SEvent
&
event
)
override
;
s32
prev_operation
;
int
prev_sel
;
...
...
gframe/myfilesystem.h
View file @
8f01a44d
...
...
@@ -88,7 +88,7 @@ public:
static
void
TraversalDir
(
const
wchar_t
*
wpath
,
const
std
::
function
<
void
(
const
wchar_t
*
,
bool
)
>&
cb
)
{
wchar_t
findstr
[
1024
];
std
::
swprintf
(
findstr
,
sizeof
findstr
/
sizeof
findstr
[
0
],
L"%s/*"
,
wpath
);
std
::
swprintf
(
findstr
,
sizeof
findstr
/
sizeof
findstr
[
0
],
L"%
l
s/*"
,
wpath
);
WIN32_FIND_DATAW
fdataw
;
HANDLE
fh
=
FindFirstFileW
(
findstr
,
&
fdataw
);
if
(
fh
==
INVALID_HANDLE_VALUE
)
...
...
gframe/single_duel.cpp
View file @
8f01a44d
...
...
@@ -419,7 +419,7 @@ void SingleDuel::TPResult(DuelPlayer* dp, unsigned char tp) {
rh
.
version
=
PRO_VERSION
;
rh
.
flag
=
REPLAY_UNIFORM
;
rh
.
seed
=
seed
;
rh
.
start_time
=
(
unsigned
int
)
time
(
nullptr
);
rh
.
start_time
=
(
unsigned
int
)
std
::
time
(
nullptr
);
last_replay
.
BeginRecord
();
last_replay
.
WriteHeader
(
rh
);
last_replay
.
WriteData
(
players
[
0
]
->
name
,
40
,
false
);
...
...
gframe/single_mode.cpp
View file @
8f01a44d
...
...
@@ -84,7 +84,7 @@ int SingleMode::SinglePlayThread() {
rh
.
version
=
PRO_VERSION
;
rh
.
flag
=
REPLAY_UNIFORM
|
REPLAY_SINGLE_MODE
;
rh
.
seed
=
seed
;
rh
.
start_time
=
(
unsigned
int
)
time
(
nullptr
);
rh
.
start_time
=
(
unsigned
int
)
std
::
time
(
nullptr
);
mainGame
->
gMutex
.
lock
();
mainGame
->
HideElement
(
mainGame
->
wSinglePlay
);
mainGame
->
ClearCardInfo
();
...
...
@@ -135,10 +135,9 @@ int SingleMode::SinglePlayThread() {
}
last_replay
.
EndRecord
();
mainGame
->
gMutex
.
lock
();
time_t
nowtime
=
time
(
nullptr
);
tm
*
localedtime
=
localtime
(
&
nowtime
);
time_t
nowtime
=
std
::
time
(
nullptr
);
wchar_t
timetext
[
40
];
std
::
wcsftime
(
timetext
,
40
,
L"%Y-%m-%d %H-%M-%S"
,
localedtime
);
std
::
wcsftime
(
timetext
,
sizeof
timetext
/
sizeof
timetext
[
0
],
L"%Y-%m-%d %H-%M-%S"
,
std
::
localtime
(
&
nowtime
)
);
mainGame
->
ebRSName
->
setText
(
timetext
);
if
(
!
mainGame
->
chkAutoSaveReplay
->
isChecked
())
{
mainGame
->
wReplaySave
->
setText
(
dataManager
.
GetSysString
(
1340
));
...
...
gframe/sound_manager.cpp
View file @
8f01a44d
...
...
@@ -12,7 +12,7 @@ bool SoundManager::Init() {
#ifdef YGOPRO_USE_IRRKLANG
bgm_scene
=
-
1
;
RefreshBGMList
();
rnd
.
reset
((
unsigned
int
)
time
(
nullptr
));
rnd
.
reset
((
unsigned
int
)
std
::
time
(
nullptr
));
engineSound
=
irrklang
::
createIrrKlangDevice
();
engineMusic
=
irrklang
::
createIrrKlangDevice
();
if
(
!
engineSound
||
!
engineMusic
)
{
...
...
gframe/tag_duel.cpp
View file @
8f01a44d
...
...
@@ -392,7 +392,7 @@ void TagDuel::TPResult(DuelPlayer* dp, unsigned char tp) {
rh
.
version
=
PRO_VERSION
;
rh
.
flag
=
REPLAY_UNIFORM
|
REPLAY_TAG
;
rh
.
seed
=
seed
;
rh
.
start_time
=
(
unsigned
int
)
time
(
nullptr
);
rh
.
start_time
=
(
unsigned
int
)
std
::
time
(
nullptr
);
last_replay
.
BeginRecord
();
last_replay
.
WriteHeader
(
rh
);
last_replay
.
WriteData
(
players
[
0
]
->
name
,
40
,
false
);
...
...
ocgcore
@
a23bd043
Subproject commit a
65f8a04772082717a4b83dff616bf84a25bf5b7
Subproject commit a
23bd0436de02505f8aa3de60c49d7f04a0bb473
script
@
576122ac
Subproject commit
9996ae87a3590d3945f8f2c5fa06674b02f6e011
Subproject commit
576122ac1b39e684cea9a0e8dd29ca363230f58a
strings.conf
View file @
8f01a44d
...
...
@@ -1245,3 +1245,7 @@
!
setname
0
x1c0
龙华 竜華
!
setname
0
x1c1
阿尔戈☆群星
ARG
☆
S
!
setname
0
x1c2
喷水引擎 アクア・ジェット
!
setname
0
x1c3
御剑
Mitsurugi
!
setname
0
x1c4
征龙 征竜
!
setname
0
x1c5
再世 再世
!
setname
0
x1c6
统王 ドミナス
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