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
f677f93a
Commit
f677f93a
authored
Feb 02, 2026
by
wind2009
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'mercury/patch-image-3' into develop
parents
3ece2ebd
dcf22d95
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
11 deletions
+16
-11
README.md
README.md
+0
-1
gframe/image_manager.cpp
gframe/image_manager.cpp
+16
-10
No files found.
README.md
View file @
f677f93a
...
...
@@ -59,7 +59,6 @@ Xyz materials:
### Directories:
*
pics: .jpg card images(177
*
254).
*
pics
\t
humbnail: .jpg thumbnail images(44
*
64).
*
script: .lua script files.
*
textures: Other image files.
*
deck: .ydk deck files.
...
...
gframe/image_manager.cpp
View file @
f677f93a
...
...
@@ -65,6 +65,10 @@ void ImageManager::ClearTexture() {
if
(
tit
->
second
&&
tit
->
second
!=
tLoading
)
driver
->
removeTexture
(
tit
->
second
);
}
for
(
auto
tit
=
tFields
.
begin
();
tit
!=
tFields
.
end
();
++
tit
)
{
if
(
tit
->
second
)
driver
->
removeTexture
(
tit
->
second
);
}
if
(
tBigPicture
!=
nullptr
)
{
driver
->
removeTexture
(
tBigPicture
);
tBigPicture
=
nullptr
;
...
...
@@ -72,13 +76,13 @@ void ImageManager::ClearTexture() {
tMap
[
0
].
clear
();
tMap
[
1
].
clear
();
tThumb
.
clear
();
tFields
.
clear
();
tThumbLoadingMutex
.
lock
();
tThumbLoading
.
clear
();
while
(
!
tThumbLoadingCodes
.
empty
())
tThumbLoadingCodes
.
pop
();
tThumbLoadingThreadRunning
=
false
;
tThumbLoadingMutex
.
unlock
();
tFields
.
clear
();
}
void
ImageManager
::
ResizeTexture
()
{
irr
::
s32
imgWidth
=
CARD_IMG_WIDTH
*
mainGame
->
xScale
;
...
...
@@ -317,10 +321,10 @@ irr::video::ITexture* ImageManager::GetTextureThumb(int code) {
return
tUnknownThumb
;
auto
tit
=
tThumb
.
find
(
code
);
if
(
tit
==
tThumb
.
end
()
&&
!
mainGame
->
gameConf
.
use_image_load_background_thread
)
{
char
file
[
256
];
mysnprintf
(
file
,
"expansions/pics/%d.jpg"
,
code
);
int
width
=
CARD_THUMB_WIDTH
*
mainGame
->
xScale
;
int
height
=
CARD_THUMB_HEIGHT
*
mainGame
->
yScale
;
char
file
[
256
];
mysnprintf
(
file
,
"expansions/pics/%d.jpg"
,
code
);
irr
::
video
::
ITexture
*
img
=
GetTextureFromFile
(
file
,
width
,
height
);
if
(
img
==
NULL
)
{
mysnprintf
(
file
,
"pics/%d.jpg"
,
code
);
...
...
@@ -334,9 +338,9 @@ irr::video::ITexture* ImageManager::GetTextureThumb(int code) {
auto
lit
=
tThumbLoading
.
find
(
code
);
if
(
lit
!=
tThumbLoading
.
end
())
{
if
(
lit
->
second
!=
nullptr
)
{
char
fil
e
[
256
];
mysnprintf
(
file
,
"pics/%d.jpg"
,
code
);
irr
::
video
::
ITexture
*
texture
=
driver
->
addTexture
(
fil
e
,
lit
->
second
);
// textures must be added in the main thread due to OpenGL
char
textureNam
e
[
256
];
mysnprintf
(
textureName
,
"pics/%d.jpg_thumbnail"
,
code
);
// not an actual file
irr
::
video
::
ITexture
*
texture
=
driver
->
addTexture
(
textureNam
e
,
lit
->
second
);
// textures must be added in the main thread due to OpenGL
lit
->
second
->
drop
();
tThumb
[
code
]
=
texture
;
}
else
{
...
...
@@ -368,20 +372,22 @@ irr::video::ITexture* ImageManager::GetTextureField(int code) {
return
nullptr
;
auto
tit
=
tFields
.
find
(
code
);
if
(
tit
==
tFields
.
end
())
{
irr
::
s32
width
=
512
*
mainGame
->
xScale
;
irr
::
s32
height
=
512
*
mainGame
->
yScale
;
char
file
[
256
];
mysnprintf
(
file
,
"expansions/pics/field/%d.png"
,
code
);
irr
::
video
::
ITexture
*
img
=
GetTextureFromFile
(
file
,
512
*
mainGame
->
xScale
,
512
*
mainGame
->
yScale
);
irr
::
video
::
ITexture
*
img
=
GetTextureFromFile
(
file
,
width
,
height
);
if
(
img
==
nullptr
)
{
mysnprintf
(
file
,
"expansions/pics/field/%d.jpg"
,
code
);
img
=
GetTextureFromFile
(
file
,
512
*
mainGame
->
xScale
,
512
*
mainGame
->
yScale
);
img
=
GetTextureFromFile
(
file
,
width
,
height
);
}
if
(
img
==
nullptr
)
{
mysnprintf
(
file
,
"pics/field/%d.png"
,
code
);
img
=
GetTextureFromFile
(
file
,
512
*
mainGame
->
xScale
,
512
*
mainGame
->
yScale
);
img
=
GetTextureFromFile
(
file
,
width
,
height
);
}
if
(
img
==
nullptr
)
{
mysnprintf
(
file
,
"pics/field/%d.jpg"
,
code
);
img
=
GetTextureFromFile
(
file
,
512
*
mainGame
->
xScale
,
512
*
mainGame
->
yScale
);
img
=
GetTextureFromFile
(
file
,
width
,
height
);
if
(
img
==
nullptr
)
{
tFields
[
code
]
=
nullptr
;
return
nullptr
;
...
...
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