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
nanahira
ygopro
Commits
5da364cb
Commit
5da364cb
authored
Aug 08, 2024
by
nanahira
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop'
parents
f52e8b19
920c69a1
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
5 deletions
+9
-5
gframe/game.cpp
gframe/game.cpp
+4
-2
gframe/image_manager.cpp
gframe/image_manager.cpp
+4
-2
script
script
+1
-1
No files found.
gframe/game.cpp
View file @
5da364cb
...
@@ -90,8 +90,10 @@ bool Game::Initialize() {
...
@@ -90,8 +90,10 @@ bool Game::Initialize() {
size_t
count
=
skins
.
size
();
size_t
count
=
skins
.
size
();
if
(
count
>
0
)
{
if
(
count
>
0
)
{
int
index
=
-
1
;
int
index
=
-
1
;
if
(
gameConf
.
skin_index
<
0
)
if
(
gameConf
.
skin_index
<
0
)
{
index
=
rand
()
%
count
;
std
::
random_device
rd
;
index
=
rd
()
%
count
;
}
else
if
((
size_t
)
gameConf
.
skin_index
<=
skins
.
size
())
else
if
((
size_t
)
gameConf
.
skin_index
<=
skins
.
size
())
index
=
skins
.
size
()
-
gameConf
.
skin_index
;
// reverse index
index
=
skins
.
size
()
-
gameConf
.
skin_index
;
// reverse index
if
(
index
>=
0
)
if
(
index
>=
0
)
...
...
gframe/image_manager.cpp
View file @
5da364cb
...
@@ -71,8 +71,9 @@ irr::video::ITexture* ImageManager::GetRandomImage(int image_type) {
...
@@ -71,8 +71,9 @@ irr::video::ITexture* ImageManager::GetRandomImage(int image_type) {
return
NULL
;
return
NULL
;
char
ImageName
[
1024
];
char
ImageName
[
1024
];
wchar_t
fname
[
1024
];
wchar_t
fname
[
1024
];
std
::
random_device
rd
;
if
(
saved_image_id
[
image_type
]
==
-
1
)
if
(
saved_image_id
[
image_type
]
==
-
1
)
saved_image_id
[
image_type
]
=
r
an
d
()
%
count
;
saved_image_id
[
image_type
]
=
rd
()
%
count
;
int
image_id
=
saved_image_id
[
image_type
];
int
image_id
=
saved_image_id
[
image_type
];
auto
name
=
ImageList
[
image_type
][
image_id
].
c_str
();
auto
name
=
ImageList
[
image_type
][
image_id
].
c_str
();
myswprintf
(
fname
,
L"./textures/%ls"
,
name
);
myswprintf
(
fname
,
L"./textures/%ls"
,
name
);
...
@@ -85,8 +86,9 @@ irr::video::ITexture* ImageManager::GetRandomImage(int image_type, s32 width, s3
...
@@ -85,8 +86,9 @@ irr::video::ITexture* ImageManager::GetRandomImage(int image_type, s32 width, s3
return
NULL
;
return
NULL
;
char
ImageName
[
1024
];
char
ImageName
[
1024
];
wchar_t
fname
[
1024
];
wchar_t
fname
[
1024
];
std
::
random_device
rd
;
if
(
saved_image_id
[
image_type
]
==
-
1
)
if
(
saved_image_id
[
image_type
]
==
-
1
)
saved_image_id
[
image_type
]
=
r
an
d
()
%
count
;
saved_image_id
[
image_type
]
=
rd
()
%
count
;
int
image_id
=
saved_image_id
[
image_type
];
int
image_id
=
saved_image_id
[
image_type
];
auto
name
=
ImageList
[
image_type
][
image_id
].
c_str
();
auto
name
=
ImageList
[
image_type
][
image_id
].
c_str
();
myswprintf
(
fname
,
L"./textures/%ls"
,
name
);
myswprintf
(
fname
,
L"./textures/%ls"
,
name
);
...
...
script
@
fd87b374
Subproject commit
ca695a4fc929a1a45d795236e71fd6fd49a34bf2
Subproject commit
fd87b37488f865f8e321b576b6166f51cb82a63b
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