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
b58f345f
Commit
b58f345f
authored
Dec 18, 2019
by
mercury233
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://github.com/Fluorohydride/ygopro
into server
parents
fa51aa4e
fbf8b4c0
Changes
13
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
305 additions
and
25 deletions
+305
-25
CMakeLists.txt
CMakeLists.txt
+5
-1
cmake/compiler/gcc.cmake
cmake/compiler/gcc.cmake
+0
-1
cmake/compiler/msvc.cmake
cmake/compiler/msvc.cmake
+1
-0
cmake/macros/MSVCJustMyCodeDebugging.cmake
cmake/macros/MSVCJustMyCodeDebugging.cmake
+23
-0
cmake/platform/xcode.cmake
cmake/platform/xcode.cmake
+0
-1
gframe/CMakeLists.txt
gframe/CMakeLists.txt
+5
-1
gframe/drawing.cpp
gframe/drawing.cpp
+1
-1
gframe/duelclient.cpp
gframe/duelclient.cpp
+32
-0
gframe/event_handler.cpp
gframe/event_handler.cpp
+25
-0
gframe/game.cpp
gframe/game.cpp
+7
-2
gframe/game.h
gframe/game.h
+16
-3
lflist.conf
lflist.conf
+190
-14
premake4.lua
premake4.lua
+0
-1
No files found.
CMakeLists.txt
View file @
b58f345f
project
(
ygo
)
cmake_minimum_required
(
VERSION
2
.8
)
cmake_minimum_required
(
VERSION
3
.8
)
if
(
NOT CMAKE_BUILD_TYPE
)
message
(
STATUS
"Setting build type to 'Debug' as none was specified."
)
...
...
@@ -15,6 +15,10 @@ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set
(
CMAKE_LIBRARY_OUTPUT_DIRECTORY
${
CMAKE_BINARY_DIR
}
/lib
)
set
(
CMAKE_RUNTIME_OUTPUT_DIRECTORY
${
CMAKE_BINARY_DIR
}
/bin
)
set
(
CMAKE_CXX_STANDARD 14
)
set
(
CMAKE_CXX_STANDARD_REQUIRED ON
)
set
(
CMAKE_CXX_EXTENSIONS OFF
)
include
(
AutoFiles
)
include
(
platform/settings
)
...
...
cmake/compiler/gcc.cmake
View file @
b58f345f
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-std=c++14"
)
set
(
CMAKE_C_FLAGS_DEBUG
"
${
CMAKE_C_FLAGS_DEBUG
}
-D_DEBUG"
)
set
(
CMAKE_CXX_FLAGS_DEBUG
"
${
CMAKE_CXX_FLAGS_DEBUG
}
-D_DEBUG"
)
add_definitions
(
"-fexceptions"
"-fomit-frame-pointer"
"-fno-strict-aliasing"
"-Wno-format-security"
)
cmake/compiler/msvc.cmake
View file @
b58f345f
...
...
@@ -3,3 +3,4 @@ add_definitions ( "-D_UNICODE" "-DUNICODE" "/utf-8" )
include
(
MSVCMultipleProcessCompile
)
include
(
MSVCStaticRuntime
)
include
(
MSVCJustMyCodeDebugging
)
cmake/macros/MSVCJustMyCodeDebugging.cmake
0 → 100644
View file @
b58f345f
# - Enable Just My Code debugging on MSVC
#
# include(MSVCJustMyCodeDebugging)
#
# Requires these CMake modules:
# ListCombinations.cmake
#
# The cmake property VS_JUST_MY_CODE_DEBUGGING introduced in CMake 3.15
# also add /JMC to Release configuration, which is inappropriate
if
(
MSVC AND NOT
"
${
MSVC_VERSION
}
"
LESS 1918
)
# Only available in VS 2017 15.8 and newer
include
(
ListCombinations
)
list_combinations
(
_varnames
PREFIXES
CMAKE_CXX_FLAGS_
SUFFIXES
DEBUG
RELWITHDEBINFO
)
foreach
(
_var
${
_varnames
}
)
set
(
${
_var
}
"
${${
_var
}}
/JMC"
)
endforeach
()
endif
()
cmake/platform/xcode.cmake
View file @
b58f345f
set
(
CMAKE_XCODE_ATTRIBUTE_GCC_VERSION
"com.apple.compilers.llvm.clang.1_0"
)
set
(
CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LANGUAGE_STANDARD
"c++14"
)
set
(
CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY
"libc++"
)
gframe/CMakeLists.txt
View file @
b58f345f
...
...
@@ -16,7 +16,11 @@ endif ()
if
(
MSVC
)
add_executable
(
ygopro WIN32
${
AUTO_FILES_RESULT
}
)
set_target_properties
(
ygopro PROPERTIES LINK_FLAGS /ENTRY:
"mainCRTStartup"
)
set_target_properties
(
ygopro PROPERTIES
LINK_FLAGS /ENTRY:
"mainCRTStartup"
VS_DEBUGGER_WORKING_DIRECTORY
"
${
CMAKE_SOURCE_DIR
}
"
)
set_property
(
DIRECTORY
${
CMAKE_SOURCE_DIR
}
PROPERTY VS_STARTUP_PROJECT ygopro
)
else
()
add_executable
(
ygopro
${
AUTO_FILES_RESULT
}
)
endif
()
...
...
gframe/drawing.cpp
View file @
b58f345f
...
...
@@ -959,7 +959,7 @@ void Game::ShowElement(irr::gui::IGUIElement * win, int autoframe) {
FadingUnit
fu
;
fu
.
fadingSize
=
win
->
getRelativePosition
();
for
(
auto
fit
=
fadingList
.
begin
();
fit
!=
fadingList
.
end
();
++
fit
)
if
(
win
==
fit
->
guiFading
&&
win
!=
wOptions
)
// the size of wOptions is always setted by ClientField::ShowSelectOption before showing it
if
(
win
==
fit
->
guiFading
&&
win
!=
wOptions
&&
win
!=
wANNumber
)
// the size of wOptions is always setted by ClientField::ShowSelectOption before showing it
fu
.
fadingSize
=
fit
->
fadingSize
;
irr
::
core
::
position2di
center
=
fu
.
fadingSize
.
getCenter
();
fu
.
fadingDiff
.
X
=
fu
.
fadingSize
.
getWidth
()
/
10
;
...
...
gframe/duelclient.cpp
View file @
b58f345f
...
...
@@ -3494,12 +3494,44 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
int
count
=
BufferIO
::
ReadInt8
(
pbuf
);
mainGame
->
gMutex
.
lock
();
mainGame
->
cbANNumber
->
clear
();
bool
quickmode
=
count
<=
12
;
if
(
quickmode
)
{
for
(
int
i
=
0
;
i
<
12
;
++
i
)
{
mainGame
->
btnANNumber
[
i
]
->
setEnabled
(
false
);
mainGame
->
btnANNumber
[
i
]
->
setPressed
(
false
);
mainGame
->
btnANNumber
[
i
]
->
setVisible
(
true
);
}
}
for
(
int
i
=
0
;
i
<
count
;
++
i
)
{
int
value
=
BufferIO
::
ReadInt32
(
pbuf
);
myswprintf
(
textBuffer
,
L" % d"
,
value
);
mainGame
->
cbANNumber
->
addItem
(
textBuffer
,
value
);
if
(
quickmode
)
{
if
((
value
>
12
||
value
<=
0
))
{
quickmode
=
false
;
}
else
{
mainGame
->
btnANNumber
[
value
-
1
]
->
setEnabled
(
true
);
}
}
}
mainGame
->
cbANNumber
->
setSelected
(
0
);
if
(
quickmode
)
{
mainGame
->
cbANNumber
->
setVisible
(
false
);
mainGame
->
btnANNumberOK
->
setRelativePosition
(
rect
<
s32
>
(
20
,
195
,
210
,
230
));
mainGame
->
btnANNumberOK
->
setEnabled
(
false
);
recti
pos
=
mainGame
->
wANNumber
->
getRelativePosition
();
pos
.
LowerRightCorner
.
Y
=
pos
.
UpperLeftCorner
.
Y
+
250
;
mainGame
->
wANNumber
->
setRelativePosition
(
pos
);
}
else
{
for
(
int
i
=
0
;
i
<
12
;
++
i
)
{
mainGame
->
btnANNumber
[
i
]
->
setVisible
(
false
);
}
mainGame
->
cbANNumber
->
setVisible
(
true
);
mainGame
->
btnANNumberOK
->
setRelativePosition
(
rect
<
s32
>
(
80
,
60
,
150
,
85
));
recti
pos
=
mainGame
->
wANNumber
->
getRelativePosition
();
pos
.
LowerRightCorner
.
Y
=
pos
.
UpperLeftCorner
.
Y
+
95
;
mainGame
->
wANNumber
->
setRelativePosition
(
pos
);
}
if
(
select_hint
)
myswprintf
(
textBuffer
,
L"%ls"
,
dataManager
.
GetDesc
(
select_hint
));
else
myswprintf
(
textBuffer
,
dataManager
.
GetSysString
(
565
));
...
...
gframe/event_handler.cpp
View file @
b58f345f
...
...
@@ -320,6 +320,31 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
SetResponseSelectedOption
();
break
;
}
case
BUTTON_ANNUMBER_1
:
case
BUTTON_ANNUMBER_2
:
case
BUTTON_ANNUMBER_3
:
case
BUTTON_ANNUMBER_4
:
case
BUTTON_ANNUMBER_5
:
case
BUTTON_ANNUMBER_6
:
case
BUTTON_ANNUMBER_7
:
case
BUTTON_ANNUMBER_8
:
case
BUTTON_ANNUMBER_9
:
case
BUTTON_ANNUMBER_10
:
case
BUTTON_ANNUMBER_11
:
case
BUTTON_ANNUMBER_12
:
{
soundManager
.
PlaySoundEffect
(
SOUND_BUTTON
);
for
(
int
i
=
0
;
i
<
mainGame
->
cbANNumber
->
getItemCount
();
++
i
)
{
if
(
id
-
BUTTON_ANNUMBER_1
+
1
==
mainGame
->
cbANNumber
->
getItemData
(
i
))
{
mainGame
->
cbANNumber
->
setSelected
(
i
);
break
;
}
}
for
(
int
i
=
0
;
i
<
12
;
++
i
)
{
mainGame
->
btnANNumber
[
i
]
->
setPressed
(
event
.
GUIEvent
.
Caller
==
mainGame
->
btnANNumber
[
i
]);
}
mainGame
->
btnANNumberOK
->
setEnabled
(
true
);
break
;
}
case
BUTTON_ANNUMBER_OK
:
{
soundManager
.
PlaySoundEffect
(
SOUND_BUTTON
);
DuelClient
::
SetResponseI
(
mainGame
->
cbANNumber
->
getSelected
());
...
...
gframe/game.cpp
View file @
b58f345f
...
...
@@ -478,11 +478,16 @@ bool Game::Initialize() {
scrDisplayList
=
env
->
addScrollBar
(
true
,
rect
<
s32
>
(
30
,
235
,
650
,
255
),
wCardDisplay
,
SCROLL_CARD_DISPLAY
);
btnDisplayOK
=
env
->
addButton
(
rect
<
s32
>
(
300
,
265
,
380
,
290
),
wCardDisplay
,
BUTTON_CARD_DISP_OK
,
dataManager
.
GetSysString
(
1211
));
//announce number
wANNumber
=
env
->
addWindow
(
rect
<
s32
>
(
550
,
200
,
780
,
295
),
false
,
L""
);
wANNumber
=
env
->
addWindow
(
rect
<
s32
>
(
550
,
180
,
780
,
430
),
false
,
L""
);
wANNumber
->
getCloseButton
()
->
setVisible
(
false
);
wANNumber
->
setVisible
(
false
);
cbANNumber
=
env
->
addComboBox
(
rect
<
s32
>
(
40
,
30
,
190
,
50
),
wANNumber
,
-
1
);
cbANNumber
->
setTextAlignment
(
irr
::
gui
::
EGUIA_CENTER
,
irr
::
gui
::
EGUIA_CENTER
);
for
(
int
i
=
0
;
i
<
12
;
++
i
)
{
myswprintf
(
strbuf
,
L"%d"
,
i
+
1
);
btnANNumber
[
i
]
=
env
->
addButton
(
rect
<
s32
>
(
20
+
50
*
(
i
%
4
),
40
+
50
*
(
i
/
4
),
60
+
50
*
(
i
%
4
),
80
+
50
*
(
i
/
4
)),
wANNumber
,
BUTTON_ANNUMBER_1
+
i
,
strbuf
);
btnANNumber
[
i
]
->
setIsPushButton
(
true
);
}
btnANNumberOK
=
env
->
addButton
(
rect
<
s32
>
(
80
,
60
,
150
,
85
),
wANNumber
,
BUTTON_ANNUMBER_OK
,
dataManager
.
GetSysString
(
1211
));
//announce card
wANCard
=
env
->
addWindow
(
rect
<
s32
>
(
510
,
120
,
820
,
420
),
false
,
L""
);
...
...
@@ -1638,7 +1643,7 @@ void Game::OnResize() {
wOptions
->
setRelativePosition
(
ResizeWin
(
490
,
200
,
840
,
340
));
wPosSelect
->
setRelativePosition
(
ResizeWin
(
340
,
200
,
935
,
410
));
wCardSelect
->
setRelativePosition
(
ResizeWin
(
320
,
100
,
1000
,
400
));
wANNumber
->
setRelativePosition
(
ResizeWin
(
550
,
200
,
780
,
295
));
wANNumber
->
setRelativePosition
(
ResizeWin
(
550
,
180
,
780
,
430
));
wANCard
->
setRelativePosition
(
ResizeWin
(
510
,
120
,
820
,
420
));
wANAttribute
->
setRelativePosition
(
ResizeWin
(
500
,
200
,
830
,
285
));
wANRace
->
setRelativePosition
(
ResizeWin
(
480
,
200
,
850
,
410
));
...
...
gframe/game.h
View file @
b58f345f
...
...
@@ -428,6 +428,7 @@ public:
//announce number
irr
::
gui
::
IGUIWindow
*
wANNumber
;
irr
::
gui
::
IGUIComboBox
*
cbANNumber
;
irr
::
gui
::
IGUIButton
*
btnANNumber
[
12
];
irr
::
gui
::
IGUIButton
*
btnANNumberOK
;
//announce card
irr
::
gui
::
IGUIWindow
*
wANCard
;
...
...
@@ -669,9 +670,18 @@ extern HostInfo game_info;
#define BUTTON_CHAIN_WHENAVAIL 266
#define BUTTON_CANCEL_OR_FINISH 267
#define BUTTON_PHASE 268
#define BUTTON_CLEAR_LOG 270
#define LISTBOX_LOG 271
#define SCROLL_CARDTEXT 280
#define BUTTON_ANNUMBER_1 270
#define BUTTON_ANNUMBER_2 271
#define BUTTON_ANNUMBER_3 272
#define BUTTON_ANNUMBER_4 273
#define BUTTON_ANNUMBER_5 274
#define BUTTON_ANNUMBER_6 275
#define BUTTON_ANNUMBER_7 276
#define BUTTON_ANNUMBER_8 277
#define BUTTON_ANNUMBER_9 278
#define BUTTON_ANNUMBER_10 279
#define BUTTON_ANNUMBER_11 280
#define BUTTON_ANNUMBER_12 281
#define BUTTON_DISPLAY_0 290
#define BUTTON_DISPLAY_1 291
#define BUTTON_DISPLAY_2 292
...
...
@@ -706,6 +716,9 @@ extern HostInfo game_info;
#define BUTTON_MARKS_FILTER 322
#define BUTTON_MARKERS_OK 323
#define COMBOBOX_SORTTYPE 324
#define BUTTON_CLEAR_LOG 350
#define LISTBOX_LOG 351
#define SCROLL_CARDTEXT 352
#define CHECKBOX_AUTO_SEARCH 360
#define CHECKBOX_ENABLE_SOUND 361
#define CHECKBOX_ENABLE_MUSIC 362
...
...
lflist.conf
View file @
b58f345f
This diff is collapsed.
Click to expand it.
premake4.lua
View file @
b58f345f
...
...
@@ -2,7 +2,6 @@ solution "ygo"
location
"build"
language
"C++"
objdir
"obj"
--startproject "ygopro"
configurations
{
"Debug"
,
"Release"
}
...
...
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