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
REIKAI
ygopro
Commits
d62b8735
Commit
d62b8735
authored
Mar 14, 2019
by
nanahira
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into another
parents
f83a3c1c
35c37697
Changes
8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
468 additions
and
260 deletions
+468
-260
cards.cdb
cards.cdb
+0
-0
gframe/duelclient.cpp
gframe/duelclient.cpp
+2
-0
gframe/image_manager.cpp
gframe/image_manager.cpp
+63
-24
gframe/image_manager.h
gframe/image_manager.h
+3
-2
lflist.conf
lflist.conf
+397
-231
ocgcore
ocgcore
+1
-1
script
script
+1
-1
strings.conf
strings.conf
+1
-1
No files found.
cards.cdb
View file @
d62b8735
No preview for this file type
gframe/duelclient.cpp
View file @
d62b8735
...
...
@@ -233,6 +233,8 @@ void DuelClient::ClientEvent(bufferevent *bev, short events, void *ctx) {
}
}
event_base_loopexit
(
client_base
,
0
);
if
(
exit_on_return
&&
auto_watch_mode
)
mainGame
->
device
->
closeDevice
();
}
}
int
DuelClient
::
ClientThread
(
void
*
param
)
{
...
...
gframe/image_manager.cpp
View file @
d62b8735
...
...
@@ -18,10 +18,9 @@ bool ImageManager::Initial() {
tCover
[
3
]
=
GetTextureFromFile
(
"textures/cover2.jpg"
,
CARD_IMG_WIDTH
,
CARD_IMG_HEIGHT
);
if
(
!
tCover
[
3
])
tCover
[
3
]
=
tCover
[
2
];
//tUnknown = NULL;
tUnknown
[
0
]
=
NULL
;
tUnknown
[
1
]
=
NULL
;
tUnknown
[
2
]
=
NULL
;
tUnknown
=
NULL
;
tUnknownFit
=
NULL
;
tUnknownThumb
=
NULL
;
tAct
=
GetRandomImage
(
TEXTURE_ACTIVATE
);
tAttack
=
GetRandomImage
(
TEXTURE_ATTACK
);
if
(
!
tAct
)
...
...
@@ -135,11 +134,6 @@ void ImageManager::ClearTexture() {
tMap
[
1
].
clear
();
tThumb
.
clear
();
tFields
.
clear
();
for
(
int
i
=
0
;
i
<
3
;
++
i
)
if
(
tUnknown
[
i
]
!=
NULL
)
{
driver
->
removeTexture
(
tUnknown
[
i
]);
tUnknown
[
i
]
=
NULL
;
}
}
void
ImageManager
::
RemoveTexture
(
int
code
)
{
auto
tit
=
tMap
[
0
].
find
(
code
);
...
...
@@ -158,6 +152,11 @@ void ImageManager::RemoveTexture(int code) {
void
ImageManager
::
ResizeTexture
()
{
irr
::
s32
imgWidth
=
CARD_IMG_WIDTH
*
mainGame
->
xScale
;
irr
::
s32
imgHeight
=
CARD_IMG_HEIGHT
*
mainGame
->
yScale
;
irr
::
s32
imgWidthThumb
=
CARD_THUMB_WIDTH
*
mainGame
->
xScale
;
irr
::
s32
imgHeightThumb
=
CARD_THUMB_HEIGHT
*
mainGame
->
yScale
;
float
mul
=
(
mainGame
->
xScale
>
mainGame
->
yScale
)
?
mainGame
->
yScale
:
mainGame
->
xScale
;
irr
::
s32
imgWidthFit
=
CARD_IMG_WIDTH
*
mul
;
irr
::
s32
imgHeightFit
=
CARD_IMG_HEIGHT
*
mul
;
irr
::
s32
bgWidth
=
1024
*
mainGame
->
xScale
;
irr
::
s32
bgHeight
=
640
*
mainGame
->
yScale
;
driver
->
removeTexture
(
tCover
[
0
]);
...
...
@@ -172,8 +171,12 @@ void ImageManager::ResizeTexture() {
tCover
[
1
]
=
GetRandomImage
(
TEXTURE_COVER_S
,
imgWidth
,
imgHeight
);
if
(
!
tCover
[
1
])
tCover
[
1
]
=
tCover
[
0
];
//driver->removeTexture(tUnknown);
//tUnknown = GetTextureFromFile("textures/unknown.jpg", imgWidth, imgHeight);
driver
->
removeTexture
(
tUnknown
);
driver
->
removeTexture
(
tUnknownFit
);
driver
->
removeTexture
(
tUnknownThumb
);
tUnknown
=
GetTextureFromFile
(
"textures/unknown.jpg"
,
CARD_IMG_WIDTH
,
CARD_IMG_HEIGHT
);
tUnknownFit
=
GetTextureFromFile
(
"textures/unknown.jpg"
,
imgWidthFit
,
imgHeightFit
);
tUnknownThumb
=
GetTextureFromFile
(
"textures/unknown.jpg"
,
imgWidthThumb
,
imgHeightThumb
);
driver
->
removeTexture
(
tBackGround
);
tBackGround
=
GetRandomImage
(
TEXTURE_DUEL
,
bgWidth
,
bgHeight
);
if
(
!
tBackGround
)
...
...
@@ -297,11 +300,6 @@ irr::video::ITexture* ImageManager::GetTextureFromFile(char* file, s32 width, s3
return
driver
->
getTexture
(
name
);
}
}
irr
::
video
::
ITexture
*
ImageManager
::
GetTextureUnknown
(
s32
width
,
s32
height
,
int
index
)
{
if
(
tUnknown
[
index
]
==
NULL
)
tUnknown
[
index
]
=
GetTextureFromFile
(
"textures/unknown.jpg"
,
width
,
height
);
return
tUnknown
[
index
];
}
irr
::
video
::
ITexture
*
ImageManager
::
GetTextureExpansions
(
char
*
file
,
s32
width
,
s32
height
)
{
irr
::
video
::
ITexture
*
img
=
GetTextureExpansionsDirectry
(
"./expansions"
,
file
,
width
,
height
);
if
(
img
!=
NULL
)
...
...
@@ -326,6 +324,8 @@ irr::video::ITexture* ImageManager::GetTextureExpansionsDirectry(const char* pat
return
GetTextureFromFile
(
fpath
,
width
,
height
);
}
irr
::
video
::
ITexture
*
ImageManager
::
GetTexture
(
int
code
,
bool
fit
)
{
if
(
code
==
0
)
return
fit
?
tUnknownFit
:
tUnknown
;
int
width
=
CARD_IMG_WIDTH
;
int
height
=
CARD_IMG_HEIGHT
;
if
(
fit
)
{
...
...
@@ -335,8 +335,6 @@ irr::video::ITexture* ImageManager::GetTexture(int code, bool fit) {
width
=
width
*
mul
;
height
=
height
*
mul
;
}
if
(
code
==
0
)
return
GetTextureUnknown
(
width
,
height
,
fit
?
1
:
0
);
auto
tit
=
tMap
[
fit
?
1
:
0
].
find
(
code
);
if
(
tit
==
tMap
[
fit
?
1
:
0
].
end
())
{
char
file
[
256
];
...
...
@@ -367,19 +365,19 @@ irr::video::ITexture* ImageManager::GetTexture(int code, bool fit) {
return
GetTextureThumb
(
code
);
}
tMap
[
fit
?
1
:
0
][
code
]
=
img
;
return
(
img
==
NULL
)
?
GetTextureUnknown
(
width
,
height
,
fit
?
1
:
0
)
:
img
;
return
(
img
==
NULL
)
?
(
fit
?
tUnknownFit
:
tUnknown
)
:
img
;
}
if
(
tit
->
second
)
return
tit
->
second
;
else
return
mainGame
->
gameConf
.
use_image_scale
?
GetTextureUnknown
(
width
,
height
,
fit
?
1
:
0
)
:
GetTextureThumb
(
code
);
return
mainGame
->
gameConf
.
use_image_scale
?
(
fit
?
tUnknownFit
:
tUnknown
)
:
GetTextureThumb
(
code
);
}
irr
::
video
::
ITexture
*
ImageManager
::
GetTextureThumb
(
int
code
)
{
if
(
code
==
0
)
return
tUnknownThumb
;
auto
tit
=
tThumb
.
find
(
code
);
int
width
=
CARD_THUMB_WIDTH
*
mainGame
->
xScale
;
int
height
=
CARD_THUMB_HEIGHT
*
mainGame
->
yScale
;
if
(
code
==
0
)
return
GetTextureUnknown
(
width
,
height
,
2
);
if
(
tit
==
tThumb
.
end
())
{
char
file
[
256
];
sprintf
(
file
,
"pics/thumbnail/%d.png"
,
code
);
...
...
@@ -429,12 +427,53 @@ irr::video::ITexture* ImageManager::GetTextureThumb(int code) {
}
}
tThumb
[
code
]
=
img
;
return
(
img
==
NULL
)
?
GetTextureUnknown
(
width
,
height
,
2
)
:
img
;
return
(
img
==
NULL
)
?
tUnknownThumb
:
img
;
}
if
(
tit
->
second
)
return
tit
->
second
;
else
return
GetTextureUnknown
(
width
,
height
,
2
);
return
tUnknownThumb
;
if
(
code
==
0
)
auto
tit
=
tFields
.
find
(
code
);
if
(
tit
==
tFields
.
end
())
{
char
file
[
256
];
sprintf
(
file
,
"pics/field/%d.png"
,
code
);
irr
::
video
::
ITexture
*
img
=
GetTextureExpansions
(
file
,
512
*
mainGame
->
xScale
,
512
*
mainGame
->
yScale
);
if
(
img
==
NULL
)
{
sprintf
(
file
,
"pics/field/%d.jpg"
,
code
);
img
=
GetTextureExpansions
(
file
,
512
*
mainGame
->
xScale
,
512
*
mainGame
->
yScale
);
}
if
(
img
==
NULL
)
{
sprintf
(
file
,
mainGame
->
GetLocaleDir
(
"pics/field/%d.png"
),
code
);
img
=
GetTextureFromFile
(
file
,
512
*
mainGame
->
xScale
,
512
*
mainGame
->
yScale
);
}
if
(
img
==
NULL
)
{
sprintf
(
file
,
mainGame
->
GetLocaleDir
(
"pics/field/%d.jpg"
),
code
);
img
=
GetTextureFromFile
(
file
,
512
*
mainGame
->
xScale
,
512
*
mainGame
->
yScale
);
}
if
(
img
==
NULL
)
{
sprintf
(
file
,
"pics/field/%d.png"
,
code
);
img
=
GetTextureFromFile
(
file
,
512
*
mainGame
->
xScale
,
512
*
mainGame
->
yScale
);
}
if
(
img
==
NULL
)
{
sprintf
(
file
,
"pics/field/%d.jpg"
,
code
);
img
=
GetTextureFromFile
(
file
,
512
*
mainGame
->
xScale
,
512
*
mainGame
->
yScale
);
if
(
img
==
NULL
)
{
tFields
[
code
]
=
NULL
;
return
NULL
;
}
else
{
tFields
[
code
]
=
img
;
return
img
;
}
}
else
{
tFields
[
code
]
=
img
;
return
img
;
}
}
if
(
tit
->
second
)
return
tit
->
second
;
else
return
NULL
;
}
irr
::
video
::
ITexture
*
ImageManager
::
GetTextureField
(
int
code
)
{
if
(
code
==
0
)
...
...
gframe/image_manager.h
View file @
d62b8735
...
...
@@ -22,7 +22,6 @@ public:
void
RemoveTexture
(
int
code
);
void
ResizeTexture
();
irr
::
video
::
ITexture
*
GetTextureFromFile
(
char
*
file
,
s32
width
,
s32
height
);
irr
::
video
::
ITexture
*
GetTextureUnknown
(
s32
width
,
s32
height
,
int
index
);
irr
::
video
::
ITexture
*
GetTextureExpansions
(
char
*
file
,
s32
width
,
s32
height
);
irr
::
video
::
ITexture
*
GetTextureExpansionsDirectry
(
const
char
*
path
,
char
*
file
,
s32
width
,
s32
height
);
irr
::
video
::
ITexture
*
GetTexture
(
int
code
,
bool
fit
=
false
);
...
...
@@ -35,7 +34,9 @@ public:
irr
::
IrrlichtDevice
*
device
;
irr
::
video
::
IVideoDriver
*
driver
;
irr
::
video
::
ITexture
*
tCover
[
4
];
irr
::
video
::
ITexture
*
tUnknown
[
3
];
irr
::
video
::
ITexture
*
tUnknown
;
irr
::
video
::
ITexture
*
tUnknownFit
;
irr
::
video
::
ITexture
*
tUnknownThumb
;
irr
::
video
::
ITexture
*
tAct
;
irr
::
video
::
ITexture
*
tAttack
;
irr
::
video
::
ITexture
*
tNegated
;
...
...
lflist.conf
View file @
d62b8735
This diff is collapsed.
Click to expand it.
ocgcore
@
d1ca9eca
Subproject commit
cce4df213bf5e928438860478038a0a59d69b846
Subproject commit
d1ca9eca73f7361710e525f92130033364e70ad9
script
@
a421e947
Subproject commit
9ace9936831e4f5292173e15a6f4a22e1a46a153
Subproject commit
a421e94715beb9e282fb57c1a56eb2f2d2f908dc
strings.conf
View file @
d62b8735
...
...
@@ -958,4 +958,4 @@
!
setname
0
x127
无限起动 無限起動
!
setname
0
x128
魔女术 ウィッチクラフト
!
setname
0
x129
咒眼 呪眼
!
setname
0
x1
30
恩底弥翁
!
setname
0
x1
2a
恩底弥翁 エンディミオン
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