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
b1ce2315
Commit
b1ce2315
authored
May 26, 2025
by
nanahira
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'salix5-patch-1' of github.com:salix5/ygopro into develop
parents
4b69c3bb
b71eae8b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
35 additions
and
25 deletions
+35
-25
gframe/game.cpp
gframe/game.cpp
+5
-19
gframe/game.h
gframe/game.h
+17
-2
gframe/image_manager.cpp
gframe/image_manager.cpp
+4
-4
premake/sqlite3/premake5.lua
premake/sqlite3/premake5.lua
+9
-0
No files found.
gframe/game.cpp
View file @
b1ce2315
...
@@ -66,22 +66,6 @@ void DuelInfo::Clear() {
...
@@ -66,22 +66,6 @@ void DuelInfo::Clear() {
announce_cache
.
clear
();
announce_cache
.
clear
();
}
}
bool
IsExtension
(
const
wchar_t
*
filename
,
const
wchar_t
*
extension
)
{
auto
flen
=
std
::
wcslen
(
filename
);
auto
elen
=
std
::
wcslen
(
extension
);
if
(
!
elen
||
flen
<
elen
)
return
false
;
return
!
mywcsncasecmp
(
filename
+
(
flen
-
elen
),
extension
,
elen
);
}
bool
IsExtension
(
const
char
*
filename
,
const
char
*
extension
)
{
auto
flen
=
std
::
strlen
(
filename
);
auto
elen
=
std
::
strlen
(
extension
);
if
(
!
elen
||
flen
<
elen
)
return
false
;
return
!
mystrncasecmp
(
filename
+
(
flen
-
elen
),
extension
,
elen
);
}
bool
Game
::
Initialize
()
{
bool
Game
::
Initialize
()
{
initUtils
();
initUtils
();
LoadConfig
();
LoadConfig
();
...
@@ -1250,19 +1234,21 @@ std::wstring Game::SetStaticText(irr::gui::IGUIStaticText* pControl, irr::u32 cW
...
@@ -1250,19 +1234,21 @@ std::wstring Game::SetStaticText(irr::gui::IGUIStaticText* pControl, irr::u32 cW
}
}
void
Game
::
LoadExpansions
()
{
void
Game
::
LoadExpansions
()
{
FileSystem
::
TraversalDir
(
L"./expansions"
,
[](
const
wchar_t
*
name
,
bool
isdir
)
{
FileSystem
::
TraversalDir
(
L"./expansions"
,
[](
const
wchar_t
*
name
,
bool
isdir
)
{
if
(
isdir
)
return
;
wchar_t
fpath
[
1024
];
wchar_t
fpath
[
1024
];
myswprintf
(
fpath
,
L"./expansions/%ls"
,
name
);
myswprintf
(
fpath
,
L"./expansions/%ls"
,
name
);
if
(
!
isdir
&&
IsExtension
(
name
,
L".cdb"
))
{
if
(
IsExtension
(
name
,
L".cdb"
))
{
dataManager
.
LoadDB
(
fpath
);
dataManager
.
LoadDB
(
fpath
);
return
;
return
;
}
}
if
(
!
isdir
&&
IsExtension
(
name
,
L".conf"
))
{
if
(
IsExtension
(
name
,
L".conf"
))
{
char
upath
[
1024
];
char
upath
[
1024
];
BufferIO
::
EncodeUTF8
(
fpath
,
upath
);
BufferIO
::
EncodeUTF8
(
fpath
,
upath
);
dataManager
.
LoadStrings
(
upath
);
dataManager
.
LoadStrings
(
upath
);
return
;
return
;
}
}
if
(
!
isdir
&&
(
IsExtension
(
name
,
L".zip"
)
||
IsExtension
(
name
,
L".ypk"
)
))
{
if
(
IsExtension
(
name
,
L".zip"
)
||
IsExtension
(
name
,
L".ypk"
))
{
#ifdef _WIN32
#ifdef _WIN32
DataManager
::
FileSystem
->
addFileArchive
(
fpath
,
true
,
false
,
irr
::
io
::
EFAT_ZIP
);
DataManager
::
FileSystem
->
addFileArchive
(
fpath
,
true
,
false
,
irr
::
io
::
EFAT_ZIP
);
#else
#else
...
...
gframe/game.h
View file @
b1ce2315
...
@@ -31,8 +31,23 @@ constexpr int TEXT_LINE_SIZE = 256;
...
@@ -31,8 +31,23 @@ constexpr int TEXT_LINE_SIZE = 256;
namespace
ygo
{
namespace
ygo
{
bool
IsExtension
(
const
wchar_t
*
filename
,
const
wchar_t
*
extension
);
template
<
size_t
N
>
bool
IsExtension
(
const
char
*
filename
,
const
char
*
extension
);
bool
IsExtension
(
const
wchar_t
*
filename
,
const
wchar_t
(
&
extension
)[
N
])
{
auto
flen
=
std
::
wcslen
(
filename
);
constexpr
size_t
elen
=
N
-
1
;
if
(
!
elen
||
flen
<
elen
)
return
false
;
return
!
mywcsncasecmp
(
filename
+
(
flen
-
elen
),
extension
,
elen
);
}
template
<
size_t
N
>
bool
IsExtension
(
const
char
*
filename
,
const
char
(
&
extension
)[
N
])
{
auto
flen
=
std
::
strlen
(
filename
);
constexpr
size_t
elen
=
N
-
1
;
if
(
!
elen
||
flen
<
elen
)
return
false
;
return
!
mystrncasecmp
(
filename
+
(
flen
-
elen
),
extension
,
elen
);
}
struct
Config
{
struct
Config
{
bool
use_d3d
{
false
};
bool
use_d3d
{
false
};
...
...
gframe/image_manager.cpp
View file @
b1ce2315
...
@@ -236,8 +236,8 @@ void ImageManager::ResizeTexture() {
...
@@ -236,8 +236,8 @@ void ImageManager::ResizeTexture() {
}
}
// function by Warr1024, from https://github.com/minetest/minetest/issues/2419 , modified
// function by Warr1024, from https://github.com/minetest/minetest/issues/2419 , modified
void
imageScaleNNAA
(
irr
::
video
::
IImage
*
src
,
irr
::
video
::
IImage
*
dest
)
{
void
imageScaleNNAA
(
irr
::
video
::
IImage
*
src
,
irr
::
video
::
IImage
*
dest
)
{
const
irr
::
core
::
dimension2d
<
irr
::
u32
>
srcDim
=
src
->
getDimension
();
const
auto
&
srcDim
=
src
->
getDimension
();
const
irr
::
core
::
dimension2d
<
irr
::
u32
>
destDim
=
dest
->
getDimension
();
const
auto
&
destDim
=
dest
->
getDimension
();
// Cache scale ratios.
// Cache scale ratios.
const
double
rx
=
(
double
)
srcDim
.
Width
/
destDim
.
Width
;
const
double
rx
=
(
double
)
srcDim
.
Width
/
destDim
.
Width
;
...
@@ -250,8 +250,8 @@ void imageScaleNNAA(irr::video::IImage *src, irr::video::IImage *dest) {
...
@@ -250,8 +250,8 @@ void imageScaleNNAA(irr::video::IImage *src, irr::video::IImage *dest) {
// Walk each destination image pixel.
// Walk each destination image pixel.
#pragma omp for schedule(dynamic)
#pragma omp for schedule(dynamic)
for
(
irr
::
s32
dy
=
0
;
dy
<
destDim
.
Height
;
dy
++
)
{
for
(
irr
::
s32
dy
=
0
;
dy
<
(
irr
::
s32
)
destDim
.
Height
;
dy
++
)
{
for
(
irr
::
s32
dx
=
0
;
dx
<
destDim
.
Width
;
dx
++
)
{
for
(
irr
::
s32
dx
=
0
;
dx
<
(
irr
::
s32
)
destDim
.
Width
;
dx
++
)
{
// Calculate floating-point source rectangle bounds.
// Calculate floating-point source rectangle bounds.
minsx
=
dx
*
rx
;
minsx
=
dx
*
rx
;
maxsx
=
minsx
+
rx
;
maxsx
=
minsx
+
rx
;
...
...
premake/sqlite3/premake5.lua
View file @
b1ce2315
...
@@ -2,3 +2,12 @@ project "sqlite3"
...
@@ -2,3 +2,12 @@ project "sqlite3"
kind
"StaticLib"
kind
"StaticLib"
files
{
"sqlite3.c"
,
"sqlite3.h"
}
files
{
"sqlite3.c"
,
"sqlite3.h"
}
defines
{
"SQLITE_DQS=0"
,
"SQLITE_DEFAULT_MEMSTATUS=0"
,
"SQLITE_MAX_EXPR_DEPTH=0"
,
"SQLITE_OMIT_DECLTYPE"
,
"SQLITE_OMIT_DEPRECATED"
,
"SQLITE_OMIT_PROGRESS_CALLBACK"
,
"SQLITE_OMIT_SHARED_CACHE"
,
}
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