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
9413944f
Commit
9413944f
authored
Jul 29, 2018
by
mercury233
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'resize' into test
parents
147f455f
1309fb25
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
21 deletions
+2
-21
gframe/drawing.cpp
gframe/drawing.cpp
+0
-1
gframe/game.cpp
gframe/game.cpp
+1
-19
gframe/replay_mode.cpp
gframe/replay_mode.cpp
+1
-1
No files found.
gframe/drawing.cpp
View file @
9413944f
...
...
@@ -889,7 +889,6 @@ void Game::DrawSpec() {
break
;
}
auto
pos
=
lpcFont
->
getDimension
(
lstr
);
//int offset = pos.Width / 2;
if
(
showcardp
<
10
)
{
int
alpha
=
(
showcardp
*
25
)
<<
24
;
DrawShadowText
(
lpcFont
,
lstr
,
ResizeElem
(
650
-
pos
.
Width
/
2
-
(
9
-
showcardp
)
*
40
,
290
,
950
,
370
),
Resize
(
-
1
,
-
1
,
0
,
0
),
alpha
|
0xffffff
,
alpha
);
...
...
gframe/game.cpp
View file @
9413944f
...
...
@@ -88,12 +88,6 @@ bool Game::Initialize() {
hWnd
=
reinterpret_cast
<
HWND
>
(
exposedData
.
D3D9
.
HWnd
);
else
hWnd
=
reinterpret_cast
<
HWND
>
(
exposedData
.
OpenGLWin32
.
HWnd
);
/*if(hWnd) {
LONG style = GetWindowLong(hWnd, GWL_STYLE);
style |= WS_MINIMIZEBOX;
SetWindowLong(hWnd, GWL_STYLE, style);
SendMessage(hWnd, WM_NCPAINT, 1, 0);
}*/
#endif
SetWindowsIcon
();
//main menu
...
...
@@ -750,7 +744,7 @@ void Game::MainLoop() {
atkdy
=
(
float
)
sin
(
atkframe
);
driver
->
beginScene
(
true
,
true
,
SColor
(
0
,
0
,
0
,
0
));
gMutex
.
Lock
();
if
(
dInfo
.
isStarted
||
dInfo
.
isReplaySkiping
)
{
if
(
dInfo
.
isStarted
)
{
if
(
dInfo
.
isFinished
&&
showcardcode
==
1
)
soundManager
.
PlayBGM
(
BGM_WIN
);
else
if
(
dInfo
.
isFinished
&&
(
showcardcode
==
2
||
showcardcode
==
3
))
...
...
@@ -1324,8 +1318,6 @@ void Game::ShowCardInfo(int code, bool resize) {
wcscat
(
formatBuffer
,
scaleBuffer
);
}
stDataInfo
->
setText
(
formatBuffer
);
//stSetName->setRelativePosition(rect<s32>(15, 83 * yScale, 296 * xScale, 83 * yScale + offset));
//stText->setRelativePosition(rect<s32>(15, 83 * yScale + offset, 287 * xScale, 324 * yScale));
stSetName
->
setRelativePosition
(
rect
<
s32
>
(
15
,
83
,
296
*
xScale
,
83
+
offset
));
stText
->
setRelativePosition
(
rect
<
s32
>
(
15
,
83
+
offset
,
287
*
xScale
,
324
*
yScale
));
scrCardText
->
setRelativePosition
(
rect
<
s32
>
(
287
*
xScale
-
20
,
83
+
offset
,
287
*
xScale
,
324
*
yScale
));
...
...
@@ -1333,8 +1325,6 @@ void Game::ShowCardInfo(int code, bool resize) {
myswprintf
(
formatBuffer
,
L"[%ls]"
,
dataManager
.
FormatType
(
cd
.
type
));
stInfo
->
setText
(
formatBuffer
);
stDataInfo
->
setText
(
L""
);
//stSetName->setRelativePosition(rect<s32>(15, 60 * yScale, 296 * xScale, 60 * yScale + offset));
//stText->setRelativePosition(rect<s32>(15, 60 * yScale + offset, 287 * xScale, 324 * yScale));
stSetName
->
setRelativePosition
(
rect
<
s32
>
(
15
,
60
,
296
*
xScale
,
60
+
offset
));
stText
->
setRelativePosition
(
rect
<
s32
>
(
15
,
60
+
offset
,
287
*
xScale
,
324
*
yScale
));
scrCardText
->
setRelativePosition
(
rect
<
s32
>
(
287
*
xScale
-
20
,
60
+
offset
,
287
*
xScale
,
324
*
yScale
));
...
...
@@ -1540,18 +1530,14 @@ void Game::OnResize() {
irr
::
gui
::
CGUITTFont
*
old_numFont
=
numFont
;
irr
::
gui
::
CGUITTFont
*
old_adFont
=
adFont
;
irr
::
gui
::
CGUITTFont
*
old_lpcFont
=
lpcFont
;
//irr::gui::CGUITTFont* old_guiFont = guiFont;
irr
::
gui
::
CGUITTFont
*
old_textFont
=
textFont
;
numFont
=
irr
::
gui
::
CGUITTFont
::
createTTFont
(
env
,
gameConf
.
numfont
,
(
yScale
>
0.5
?
16
*
yScale
:
8
));
adFont
=
irr
::
gui
::
CGUITTFont
::
createTTFont
(
env
,
gameConf
.
numfont
,
(
yScale
>
0.75
?
12
*
yScale
:
9
));
lpcFont
=
irr
::
gui
::
CGUITTFont
::
createTTFont
(
env
,
gameConf
.
numfont
,
48
*
yScale
);
//guiFont = irr::gui::CGUITTFont::createTTFont(env, gameConf.textfont, gameConf.textfontsize * yScale);
//env->getSkin()->setFont(guiFont);
textFont
=
irr
::
gui
::
CGUITTFont
::
createTTFont
(
env
,
gameConf
.
textfont
,
(
yScale
>
0.642
?
gameConf
.
textfontsize
*
yScale
:
9
));
old_numFont
->
drop
();
old_adFont
->
drop
();
old_lpcFont
->
drop
();
//old_guiFont->drop();
old_textFont
->
drop
();
imageManager
.
ClearTexture
();
...
...
@@ -1654,11 +1640,7 @@ void Game::OnResize() {
imgCard
->
setRelativePosition
(
ResizeCard
(
10
,
9
,
0
,
0
));
wInfos
->
setRelativePosition
(
Resize
(
1
,
275
,
301
,
639
));
stName
->
setRelativePosition
(
recti
(
10
,
10
,
300
*
xScale
-
13
,
10
+
22
));
//stName->setRelativePosition(recti(10, 10, 300 * xScale - 13, 10 + 22 * yScale));
//stInfo->setRelativePosition(recti(15, 37 * yScale, 300 * xScale - 13, 60 * yScale));
//stDataInfo->setRelativePosition(recti(15, 60 * yScale, 300 * xScale - 13, 83 * yScale));
lstLog
->
setRelativePosition
(
Resize
(
10
,
10
,
290
,
290
));
//const auto& tsize = stText->getRelativePosition();
if
(
showingcode
)
ShowCardInfo
(
showingcode
,
true
);
btnClearLog
->
setRelativePosition
(
Resize
(
160
,
300
,
260
,
325
));
...
...
gframe/replay_mode.cpp
View file @
9413944f
...
...
@@ -106,6 +106,7 @@ int ReplayMode::ReplayThread(void* param) {
get_message
(
pduel
,
(
byte
*
)
engineBuffer
);
is_continuing
=
ReplayAnalyze
(
engineBuffer
,
len
);
if
(
is_restarting
)
{
mainGame
->
gMutex
.
Lock
();
is_restarting
=
false
;
int
step
=
current_step
-
1
;
if
(
step
<
0
)
...
...
@@ -280,7 +281,6 @@ void ReplayMode::Undo() {
return
;
mainGame
->
dInfo
.
isReplaySkiping
=
true
;
Restart
(
false
);
mainGame
->
gMutex
.
Lock
();
Pause
(
false
,
false
);
}
bool
ReplayMode
::
ReplayAnalyze
(
char
*
msg
,
unsigned
int
len
)
{
...
...
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