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
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
Commits
5178a0a6
Commit
5178a0a6
authored
Jun 30, 2025
by
nanahira
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into server-develop
parents
95ed3727
b8bb7ea0
Changes
12
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
254 additions
and
36 deletions
+254
-36
cards.cdb
cards.cdb
+0
-0
gframe/client_field.cpp
gframe/client_field.cpp
+38
-10
gframe/client_field.h
gframe/client_field.h
+1
-0
gframe/duelclient.cpp
gframe/duelclient.cpp
+1
-1
gframe/game.cpp
gframe/game.cpp
+2
-2
gframe/menu_handler.cpp
gframe/menu_handler.cpp
+5
-1
gframe/premake5.lua
gframe/premake5.lua
+3
-1
lflist.conf
lflist.conf
+196
-13
ocgcore
ocgcore
+1
-1
premake/event/premake5.lua
premake/event/premake5.lua
+4
-4
resource/gframe/ygopro.rc
resource/gframe/ygopro.rc
+2
-2
script
script
+1
-1
No files found.
cards.cdb
View file @
5178a0a6
No preview for this file type
gframe/client_field.cpp
View file @
5178a0a6
...
@@ -228,12 +228,12 @@ void ClientField::AddCard(ClientCard* pcard, int controler, int location, int se
...
@@ -228,12 +228,12 @@ void ClientField::AddCard(ClientCard* pcard, int controler, int location, int se
}
}
case
LOCATION_GRAVE
:
{
case
LOCATION_GRAVE
:
{
grave
[
controler
].
push_back
(
pcard
);
grave
[
controler
].
push_back
(
pcard
);
ResetSequence
(
grave
[
controler
],
false
);
pcard
->
sequence
=
(
unsigned
char
)(
grave
[
controler
].
size
()
-
1
);
break
;
break
;
}
}
case
LOCATION_REMOVED
:
{
case
LOCATION_REMOVED
:
{
remove
[
controler
].
push_back
(
pcard
);
remove
[
controler
].
push_back
(
pcard
);
ResetSequence
(
remove
[
controler
],
false
);
pcard
->
sequence
=
(
unsigned
char
)(
remove
[
controler
].
size
()
-
1
);
break
;
break
;
}
}
case
LOCATION_EXTRA
:
{
case
LOCATION_EXTRA
:
{
...
@@ -256,8 +256,13 @@ ClientCard* ClientField::RemoveCard(int controler, int location, int sequence) {
...
@@ -256,8 +256,13 @@ ClientCard* ClientField::RemoveCard(int controler, int location, int sequence) {
switch
(
location
)
{
switch
(
location
)
{
case
LOCATION_DECK
:
{
case
LOCATION_DECK
:
{
pcard
=
deck
[
controler
][
sequence
];
pcard
=
deck
[
controler
][
sequence
];
deck
[
controler
].
erase
(
deck
[
controler
].
begin
()
+
sequence
);
for
(
size_t
i
=
sequence
;
i
<
deck
[
controler
].
size
()
-
1
;
++
i
)
{
ResetSequence
(
deck
[
controler
],
true
);
deck
[
controler
][
i
]
=
deck
[
controler
][
i
+
1
];
deck
[
controler
][
i
]
->
sequence
--
;
deck
[
controler
][
i
]
->
curPos
-=
irr
::
core
::
vector3df
(
0
,
0
,
0.01
f
);
deck
[
controler
][
i
]
->
mTransform
.
setTranslation
(
deck
[
controler
][
i
]
->
curPos
);
}
deck
[
controler
].
erase
(
deck
[
controler
].
end
()
-
1
);
break
;
break
;
}
}
case
LOCATION_HAND
:
{
case
LOCATION_HAND
:
{
...
@@ -278,20 +283,35 @@ ClientCard* ClientField::RemoveCard(int controler, int location, int sequence) {
...
@@ -278,20 +283,35 @@ ClientCard* ClientField::RemoveCard(int controler, int location, int sequence) {
}
}
case
LOCATION_GRAVE
:
{
case
LOCATION_GRAVE
:
{
pcard
=
grave
[
controler
][
sequence
];
pcard
=
grave
[
controler
][
sequence
];
grave
[
controler
].
erase
(
grave
[
controler
].
begin
()
+
sequence
);
for
(
size_t
i
=
sequence
;
i
<
grave
[
controler
].
size
()
-
1
;
++
i
)
{
ResetSequence
(
grave
[
controler
],
true
);
grave
[
controler
][
i
]
=
grave
[
controler
][
i
+
1
];
grave
[
controler
][
i
]
->
sequence
--
;
grave
[
controler
][
i
]
->
curPos
-=
irr
::
core
::
vector3df
(
0
,
0
,
0.01
f
);
grave
[
controler
][
i
]
->
mTransform
.
setTranslation
(
grave
[
controler
][
i
]
->
curPos
);
}
grave
[
controler
].
erase
(
grave
[
controler
].
end
()
-
1
);
break
;
break
;
}
}
case
LOCATION_REMOVED
:
{
case
LOCATION_REMOVED
:
{
pcard
=
remove
[
controler
][
sequence
];
pcard
=
remove
[
controler
][
sequence
];
remove
[
controler
].
erase
(
remove
[
controler
].
begin
()
+
sequence
);
for
(
size_t
i
=
sequence
;
i
<
remove
[
controler
].
size
()
-
1
;
++
i
)
{
ResetSequence
(
remove
[
controler
],
true
);
remove
[
controler
][
i
]
=
remove
[
controler
][
i
+
1
];
remove
[
controler
][
i
]
->
sequence
--
;
remove
[
controler
][
i
]
->
curPos
-=
irr
::
core
::
vector3df
(
0
,
0
,
0.01
f
);
remove
[
controler
][
i
]
->
mTransform
.
setTranslation
(
remove
[
controler
][
i
]
->
curPos
);
}
remove
[
controler
].
erase
(
remove
[
controler
].
end
()
-
1
);
break
;
break
;
}
}
case
LOCATION_EXTRA
:
{
case
LOCATION_EXTRA
:
{
pcard
=
extra
[
controler
][
sequence
];
pcard
=
extra
[
controler
][
sequence
];
extra
[
controler
].
erase
(
extra
[
controler
].
begin
()
+
sequence
);
for
(
size_t
i
=
sequence
;
i
<
extra
[
controler
].
size
()
-
1
;
++
i
)
{
ResetSequence
(
extra
[
controler
],
true
);
extra
[
controler
][
i
]
=
extra
[
controler
][
i
+
1
];
extra
[
controler
][
i
]
->
sequence
--
;
extra
[
controler
][
i
]
->
curPos
-=
irr
::
core
::
vector3df
(
0
,
0
,
0.01
f
);
extra
[
controler
][
i
]
->
mTransform
.
setTranslation
(
extra
[
controler
][
i
]
->
curPos
);
}
extra
[
controler
].
erase
(
extra
[
controler
].
end
()
-
1
);
if
(
pcard
->
position
&
POS_FACEUP
)
if
(
pcard
->
position
&
POS_FACEUP
)
extra_p_count
[
controler
]
--
;
extra_p_count
[
controler
]
--
;
break
;
break
;
...
@@ -1293,6 +1313,14 @@ bool ClientField::CheckSelectTribute() {
...
@@ -1293,6 +1313,14 @@ bool ClientField::CheckSelectTribute() {
}
}
return
ret
;
return
ret
;
}
}
void
ClientField
::
get_sum_params
(
unsigned
int
opParam
,
int
&
op1
,
int
&
op2
)
{
op1
=
opParam
&
0xffff
;
op2
=
(
opParam
>>
16
)
&
0xffff
;
if
(
op2
&
0x8000
)
{
op1
=
opParam
&
0x7fffffff
;
op2
=
0
;
}
}
bool
ClientField
::
check_min
(
const
std
::
set
<
ClientCard
*>&
left
,
std
::
set
<
ClientCard
*>::
const_iterator
index
,
int
min
,
int
max
)
{
bool
ClientField
::
check_min
(
const
std
::
set
<
ClientCard
*>&
left
,
std
::
set
<
ClientCard
*>::
const_iterator
index
,
int
min
,
int
max
)
{
if
(
index
==
left
.
end
())
if
(
index
==
left
.
end
())
return
false
;
return
false
;
...
...
gframe/client_field.h
View file @
5178a0a6
...
@@ -121,6 +121,7 @@ public:
...
@@ -121,6 +121,7 @@ public:
bool
ShowSelectSum
(
bool
panelmode
);
bool
ShowSelectSum
(
bool
panelmode
);
bool
CheckSelectSum
();
bool
CheckSelectSum
();
bool
CheckSelectTribute
();
bool
CheckSelectTribute
();
void
get_sum_params
(
unsigned
int
opParam
,
int
&
op1
,
int
&
op2
);
bool
check_min
(
const
std
::
set
<
ClientCard
*>&
left
,
std
::
set
<
ClientCard
*>::
const_iterator
index
,
int
min
,
int
max
);
bool
check_min
(
const
std
::
set
<
ClientCard
*>&
left
,
std
::
set
<
ClientCard
*>::
const_iterator
index
,
int
min
,
int
max
);
bool
check_sel_sum_s
(
const
std
::
set
<
ClientCard
*>&
left
,
int
index
,
int
acc
);
bool
check_sel_sum_s
(
const
std
::
set
<
ClientCard
*>&
left
,
int
index
,
int
acc
);
void
check_sel_sum_t
(
const
std
::
set
<
ClientCard
*>&
left
,
int
acc
);
void
check_sel_sum_t
(
const
std
::
set
<
ClientCard
*>&
left
,
int
acc
);
...
...
gframe/duelclient.cpp
View file @
5178a0a6
...
@@ -134,7 +134,7 @@ void DuelClient::ClientEvent(bufferevent* bev, short events, void* ctx) {
...
@@ -134,7 +134,7 @@ void DuelClient::ClientEvent(bufferevent* bev, short events, void* ctx) {
uint16_t
hostname_buf
[
LEN_HOSTNAME
];
uint16_t
hostname_buf
[
LEN_HOSTNAME
];
auto
hostname_len
=
BufferIO
::
CopyCharArray
(
mainGame
->
ebJoinHost
->
getText
(),
hostname_buf
);
auto
hostname_len
=
BufferIO
::
CopyCharArray
(
mainGame
->
ebJoinHost
->
getText
(),
hostname_buf
);
auto
hostname_msglen
=
(
hostname_len
+
1
)
*
sizeof
(
uint16_t
);
auto
hostname_msglen
=
(
hostname_len
+
1
)
*
sizeof
(
uint16_t
);
char
buf
[
LEN_HOSTNAME
*
sizeof
(
int16_t
)
+
sizeof
(
uint32_t
)];
char
buf
[
LEN_HOSTNAME
*
sizeof
(
u
int16_t
)
+
sizeof
(
uint32_t
)];
memset
(
buf
,
0
,
sizeof
(
uint32_t
));
// real_ip
memset
(
buf
,
0
,
sizeof
(
uint32_t
));
// real_ip
memcpy
(
buf
+
sizeof
(
uint32_t
),
hostname_buf
,
hostname_msglen
);
memcpy
(
buf
+
sizeof
(
uint32_t
),
hostname_buf
,
hostname_msglen
);
SendBufferToServer
(
CTOS_EXTERNAL_ADDRESS
,
buf
,
hostname_msglen
+
sizeof
(
uint32_t
));
SendBufferToServer
(
CTOS_EXTERNAL_ADDRESS
,
buf
,
hostname_msglen
+
sizeof
(
uint32_t
));
...
...
gframe/game.cpp
View file @
5178a0a6
...
@@ -29,7 +29,7 @@ namespace irr {
...
@@ -29,7 +29,7 @@ namespace irr {
#include <thread>
#include <thread>
#include "myfilesystem.h"
#include "myfilesystem.h"
unsigned
short
PRO_VERSION
=
0x136
1
;
unsigned
short
PRO_VERSION
=
0x136
2
;
namespace
ygo
{
namespace
ygo
{
...
@@ -274,7 +274,7 @@ bool Game::Initialize() {
...
@@ -274,7 +274,7 @@ bool Game::Initialize() {
SetWindowsIcon
();
SetWindowsIcon
();
//main menu
//main menu
wchar_t
strbuf
[
256
];
wchar_t
strbuf
[
256
];
myswprintf
(
strbuf
,
L"KoishiPro %X.0%X.%X
Collaps
e"
,
(
PRO_VERSION
&
0xf000U
)
>>
12
,
(
PRO_VERSION
&
0x0ff0U
)
>>
4
,
PRO_VERSION
&
0x000fU
);
myswprintf
(
strbuf
,
L"KoishiPro %X.0%X.%X
Manjushag
e"
,
(
PRO_VERSION
&
0xf000U
)
>>
12
,
(
PRO_VERSION
&
0x0ff0U
)
>>
4
,
PRO_VERSION
&
0x000fU
);
wMainMenu
=
env
->
addWindow
(
irr
::
core
::
rect
<
irr
::
s32
>
(
370
,
200
,
650
,
415
),
false
,
strbuf
);
wMainMenu
=
env
->
addWindow
(
irr
::
core
::
rect
<
irr
::
s32
>
(
370
,
200
,
650
,
415
),
false
,
strbuf
);
wMainMenu
->
getCloseButton
()
->
setVisible
(
false
);
wMainMenu
->
getCloseButton
()
->
setVisible
(
false
);
btnLanMode
=
env
->
addButton
(
irr
::
core
::
rect
<
irr
::
s32
>
(
10
,
30
,
270
,
60
),
wMainMenu
,
BUTTON_LAN_MODE
,
dataManager
.
GetSysString
(
1200
));
btnLanMode
=
env
->
addButton
(
irr
::
core
::
rect
<
irr
::
s32
>
(
10
,
30
,
270
,
60
),
wMainMenu
,
BUTTON_LAN_MODE
,
dataManager
.
GetSysString
(
1200
));
...
...
gframe/menu_handler.cpp
View file @
5178a0a6
...
@@ -217,8 +217,12 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) {
...
@@ -217,8 +217,12 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) {
case
BUTTON_LOAD_REPLAY
:
{
case
BUTTON_LOAD_REPLAY
:
{
int
start_turn
=
1
;
int
start_turn
=
1
;
if
(
open_file
)
{
if
(
open_file
)
{
ReplayMode
::
cur_replay
.
OpenReplay
(
open_file_name
);
open_file
=
false
;
open_file
=
false
;
if
(
!
ReplayMode
::
cur_replay
.
OpenReplay
(
open_file_name
))
{
if
(
exit_on_return
)
mainGame
->
device
->
closeDevice
();
break
;
}
}
else
{
}
else
{
auto
selected
=
mainGame
->
lstReplayList
->
getSelected
();
auto
selected
=
mainGame
->
lstReplayList
->
getSelected
();
if
(
selected
==
-
1
)
if
(
selected
==
-
1
)
...
...
gframe/premake5.lua
View file @
5178a0a6
...
@@ -45,7 +45,6 @@ end
...
@@ -45,7 +45,6 @@ end
else
else
project
"ygopro"
project
"ygopro"
kind
"WindowedApp"
kind
"WindowedApp"
cppdialect
"C++14"
rtti
"Off"
rtti
"Off"
openmp
"On"
openmp
"On"
...
@@ -141,6 +140,9 @@ if not SERVER_MODE then
...
@@ -141,6 +140,9 @@ if not SERVER_MODE then
filter
"not system:windows"
filter
"not system:windows"
links
{
"resolv"
}
links
{
"resolv"
}
end
end
filter
"not action:vs*"
cppdialect
"C++14"
filter
"system:macosx"
filter
"system:macosx"
if
not
SERVER_MODE
then
if
not
SERVER_MODE
then
openmp
"Off"
openmp
"Off"
...
...
lflist.conf
View file @
5178a0a6
This diff is collapsed.
Click to expand it.
ocgcore
@
326c22e9
Subproject commit
dc4501aee33d83cc4849f0e49f2efde02e7dff0e
Subproject commit
326c22e9bd5af2e0f295eb263c095584342db952
premake/event/premake5.lua
View file @
5178a0a6
project
"event"
project
"event"
kind
"StaticLib"
kind
"StaticLib"
local
EVENT_VERSION
=
(
io
.
readfile
(
"configure"
)
or
""
):
match
(
"NUMERIC_VERSION%s+
0x(
%x+)"
)
local
EVENT_VERSION
=
(
io
.
readfile
(
"configure"
)
or
""
):
match
(
"NUMERIC_VERSION%s+
(0x
%x+)"
)
if
not
EVENT_VERSION
then
if
not
EVENT_VERSION
then
print
(
"Warning: Could not determine libevent version from the configure file, assuming 2.1.12."
)
print
(
"Warning: Could not determine libevent version from the configure file, assuming 2.1.12."
)
EVENT_VERSION
=
"02010c00"
-- 2.1.12
EVENT_VERSION
=
"0
x0
2010c00"
-- 2.1.12
end
end
EVENT_VERSION
=
tonumber
(
EVENT_VERSION
,
16
)
EVENT_VERSION
=
tonumber
(
EVENT_VERSION
)
if
EVENT_VERSION
>=
0x02020000
then
if
EVENT_VERSION
>=
0x02020000
then
print
(
"Warning: Using libevent version 2.2.x is not supported, please use 2.1.x, otherwise you may encounter issues."
)
print
(
"Warning: Using libevent version 2.2.x is not supported, please use 2.1.x, otherwise you may encounter issues."
)
end
end
if
EVENT_VERSION
>=
0x02010000
and
WINXP_SUPPORT
then
if
EVENT_VERSION
>=
0x02010000
and
WINXP_SUPPORT
then
print
(
"Warning: libevent 2.1 uses some new APIs which require Windows Vista or later, so WinXP support will be
not
valid."
)
print
(
"Warning: libevent 2.1 uses some new APIs which require Windows Vista or later, so WinXP support will be
in
valid."
)
end
end
includedirs
{
"include"
,
"compat"
}
includedirs
{
"include"
,
"compat"
}
...
...
resource/gframe/ygopro.rc
View file @
5178a0a6
1 ICON "ygopro.ico"
1 ICON "ygopro.ico"
1 VERSIONINFO
1 VERSIONINFO
FILEVERSION 1, 0, 36,
1
FILEVERSION 1, 0, 36,
2
PRODUCTVERSION 1, 0, 36,
1
PRODUCTVERSION 1, 0, 36,
2
FILEOS 0x4
FILEOS 0x4
FILETYPE 0x1
FILETYPE 0x1
...
...
script
@
a6d12425
Subproject commit
e7feeaa304fcf9c7fc23dfcbc68276be09c5e2ef
Subproject commit
a6d1242563104c5bf7e0584c6e80dafd6b02966d
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