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
1f42671e
Commit
1f42671e
authored
Aug 03, 2017
by
mercury233
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'mac_crash_fix' of
https://github.com/zhykzhykzhyk/ygopro
into mac-test
parents
30539039
07cb023c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
6 deletions
+21
-6
gframe/CGUITTFont.cpp
gframe/CGUITTFont.cpp
+3
-4
gframe/CGUITTFont.h
gframe/CGUITTFont.h
+10
-0
gframe/deck_con.cpp
gframe/deck_con.cpp
+6
-1
gframe/game.cpp
gframe/game.cpp
+2
-1
No files found.
gframe/CGUITTFont.cpp
View file @
1f42671e
...
@@ -153,7 +153,7 @@ void SGUITTGlyph::preload(u32 char_index, FT_Face face, video::IVideoDriver* dri
...
@@ -153,7 +153,7 @@ void SGUITTGlyph::preload(u32 char_index, FT_Face face, video::IVideoDriver* dri
}
}
glyph_page
=
parent
->
getLastGlyphPageIndex
();
glyph_page
=
parent
->
getLastGlyphPageIndex
();
u32
texture_side_length
=
page
->
texture
->
getOriginalSize
()
.
Width
;
u32
texture_side_length
=
page
->
texture
_size
.
Width
;
core
::
vector2di
page_position
(
core
::
vector2di
page_position
(
(
page
->
used_slots
%
(
texture_side_length
/
font_size
))
*
font_size
,
(
page
->
used_slots
%
(
texture_side_length
/
font_size
))
*
font_size
,
(
page
->
used_slots
/
(
texture_side_length
/
font_size
))
*
font_size
(
page
->
used_slots
/
(
texture_side_length
/
font_size
))
*
font_size
...
@@ -443,9 +443,8 @@ CGUITTGlyphPage* CGUITTFont::createGlyphPage(const u8& pixel_mode) {
...
@@ -443,9 +443,8 @@ CGUITTGlyphPage* CGUITTFont::createGlyphPage(const u8& pixel_mode) {
if
(
page_texture_size
.
Width
>
max_texture_size
.
Width
||
page_texture_size
.
Height
>
max_texture_size
.
Height
)
if
(
page_texture_size
.
Width
>
max_texture_size
.
Width
||
page_texture_size
.
Height
>
max_texture_size
.
Height
)
page_texture_size
=
max_texture_size
;
page_texture_size
=
max_texture_size
;
if
(
!
page
->
createPageTexture
(
pixel_mode
,
page_texture_size
))
page
->
texture_size
=
page_texture_size
;
// TODO: add error message?
page
->
pixel_mode
=
pixel_mode
;
return
0
;
if
(
page
)
{
if
(
page
)
{
// Determine the number of glyph slots on the page and add it to the list of pages.
// Determine the number of glyph slots on the page and add it to the list of pages.
...
...
gframe/CGUITTFont.h
View file @
1f42671e
...
@@ -143,6 +143,13 @@ public:
...
@@ -143,6 +143,13 @@ public:
void
updateTexture
()
{
void
updateTexture
()
{
if
(
!
dirty
)
return
;
if
(
!
dirty
)
return
;
if
(
!
texture
)
{
if
(
!
createPageTexture
(
pixel_mode
,
texture_size
))
// TODO: add error message?
return
;
}
void
*
ptr
=
texture
->
lock
();
void
*
ptr
=
texture
->
lock
();
video
::
ECOLOR_FORMAT
format
=
texture
->
getColorFormat
();
video
::
ECOLOR_FORMAT
format
=
texture
->
getColorFormat
();
core
::
dimension2du
size
=
texture
->
getOriginalSize
();
core
::
dimension2du
size
=
texture
->
getOriginalSize
();
...
@@ -176,6 +183,9 @@ public:
...
@@ -176,6 +183,9 @@ public:
core
::
array
<
core
::
vector2di
>
render_positions
;
core
::
array
<
core
::
vector2di
>
render_positions
;
core
::
array
<
core
::
recti
>
render_source_rects
;
core
::
array
<
core
::
recti
>
render_source_rects
;
core
::
dimension2du
texture_size
;
u8
pixel_mode
;
private:
private:
core
::
array
<
const
SGUITTGlyph
*>
glyph_to_be_paged
;
core
::
array
<
const
SGUITTGlyph
*>
glyph_to_be_paged
;
video
::
IVideoDriver
*
driver
;
video
::
IVideoDriver
*
driver
;
...
...
gframe/deck_con.cpp
View file @
1f42671e
...
@@ -96,7 +96,7 @@ void DeckBuilder::Terminate() {
...
@@ -96,7 +96,7 @@ void DeckBuilder::Terminate() {
mainGame
->
PopupElement
(
mainGame
->
wMainMenu
);
mainGame
->
PopupElement
(
mainGame
->
wMainMenu
);
mainGame
->
device
->
setEventReceiver
(
&
mainGame
->
menuHandler
);
mainGame
->
device
->
setEventReceiver
(
&
mainGame
->
menuHandler
);
mainGame
->
wACMessage
->
setVisible
(
false
);
mainGame
->
wACMessage
->
setVisible
(
false
);
imageManager
.
ClearTexture
();
mainGame
->
ClearTextures
();
mainGame
->
scrFilter
->
setVisible
(
false
);
mainGame
->
scrFilter
->
setVisible
(
false
);
int
sel
=
mainGame
->
cbDBDecks
->
getSelected
();
int
sel
=
mainGame
->
cbDBDecks
->
getSelected
();
if
(
sel
>=
0
)
if
(
sel
>=
0
)
...
@@ -224,6 +224,11 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
...
@@ -224,6 +224,11 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
mainGame
->
env
->
addMessageBox
(
L""
,
dataManager
.
GetSysString
(
1410
));
mainGame
->
env
->
addMessageBox
(
L""
,
dataManager
.
GetSysString
(
1410
));
break
;
break
;
}
}
// clear imgCard
mainGame
->
imgCard
->
setImage
(
imageManager
.
tCover
[
0
]);
// send result to server
char
deckbuf
[
1024
];
char
deckbuf
[
1024
];
char
*
pdeck
=
deckbuf
;
char
*
pdeck
=
deckbuf
;
BufferIO
::
WriteInt32
(
pdeck
,
deckManager
.
current_deck
.
main
.
size
()
+
deckManager
.
current_deck
.
extra
.
size
());
BufferIO
::
WriteInt32
(
pdeck
,
deckManager
.
current_deck
.
main
.
size
()
+
deckManager
.
current_deck
.
extra
.
size
());
...
...
gframe/game.cpp
View file @
1f42671e
...
@@ -201,6 +201,7 @@ bool Game::Initialize() {
...
@@ -201,6 +201,7 @@ bool Game::Initialize() {
wCardImg
->
setBackgroundColor
(
0xc0c0c0c0
);
wCardImg
->
setBackgroundColor
(
0xc0c0c0c0
);
wCardImg
->
setVisible
(
false
);
wCardImg
->
setVisible
(
false
);
imgCard
=
env
->
addImage
(
rect
<
s32
>
(
10
,
9
,
187
,
263
),
wCardImg
);
imgCard
=
env
->
addImage
(
rect
<
s32
>
(
10
,
9
,
187
,
263
),
wCardImg
);
imgCard
->
setImage
(
imageManager
.
tCover
[
0
]);
imgCard
->
setUseAlphaChannel
(
true
);
imgCard
->
setUseAlphaChannel
(
true
);
//phase
//phase
wPhase
=
env
->
addStaticText
(
L""
,
rect
<
s32
>
(
480
,
310
,
855
,
330
));
wPhase
=
env
->
addStaticText
(
L""
,
rect
<
s32
>
(
480
,
310
,
855
,
330
));
...
@@ -1185,7 +1186,7 @@ void Game::AddDebugMsg(char* msg)
...
@@ -1185,7 +1186,7 @@ void Game::AddDebugMsg(char* msg)
}
}
void
Game
::
ClearTextures
()
{
void
Game
::
ClearTextures
()
{
matManager
.
mCard
.
setTexture
(
0
,
0
);
matManager
.
mCard
.
setTexture
(
0
,
0
);
mainGame
->
imgCard
->
setImage
(
0
);
mainGame
->
imgCard
->
setImage
(
imageManager
.
tCover
[
0
]
);
mainGame
->
btnPSAU
->
setImage
();
mainGame
->
btnPSAU
->
setImage
();
mainGame
->
btnPSDU
->
setImage
();
mainGame
->
btnPSDU
->
setImage
();
for
(
int
i
=
0
;
i
<=
4
;
++
i
)
{
for
(
int
i
=
0
;
i
<=
4
;
++
i
)
{
...
...
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