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
baichixing
ygopro
Commits
0586e8ab
Commit
0586e8ab
authored
May 07, 2018
by
mercury233
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'fh' into resize
parents
20c42df6
621551e9
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
59 additions
and
2 deletions
+59
-2
gframe/game.cpp
gframe/game.cpp
+52
-0
gframe/game.h
gframe/game.h
+2
-0
ocgcore
ocgcore
+1
-1
script
script
+1
-1
strings.conf
strings.conf
+3
-0
No files found.
gframe/game.cpp
View file @
0586e8ab
...
@@ -12,7 +12,12 @@
...
@@ -12,7 +12,12 @@
#ifndef _WIN32
#ifndef _WIN32
#include <sys/types.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <dirent.h>
#include <dirent.h>
#include <unistd.h>
#else
#include <direct.h>
#include <io.h>
#endif
#endif
const
unsigned
short
PRO_VERSION
=
0x1343
;
const
unsigned
short
PRO_VERSION
=
0x1343
;
...
@@ -23,6 +28,7 @@ Game* mainGame;
...
@@ -23,6 +28,7 @@ Game* mainGame;
bool
Game
::
Initialize
()
{
bool
Game
::
Initialize
()
{
srand
(
time
(
0
));
srand
(
time
(
0
));
initUtils
();
LoadConfig
();
LoadConfig
();
irr
::
SIrrlichtCreationParameters
params
=
irr
::
SIrrlichtCreationParameters
();
irr
::
SIrrlichtCreationParameters
params
=
irr
::
SIrrlichtCreationParameters
();
params
.
AntiAlias
=
gameConf
.
antialias
;
params
.
AntiAlias
=
gameConf
.
antialias
;
...
@@ -1374,6 +1380,52 @@ void Game::AddDebugMsg(char* msg)
...
@@ -1374,6 +1380,52 @@ void Game::AddDebugMsg(char* msg)
fclose
(
fp
);
fclose
(
fp
);
}
}
}
}
bool
Game
::
MakeDirectory
(
const
std
::
string
folder
)
{
std
::
string
folder_builder
;
std
::
string
sub
;
sub
.
reserve
(
folder
.
size
());
for
(
auto
it
=
folder
.
begin
();
it
!=
folder
.
end
();
++
it
)
{
const
char
c
=
*
it
;
sub
.
push_back
(
c
);
if
(
c
==
'/'
||
it
==
folder
.
end
()
-
1
)
{
folder_builder
.
append
(
sub
);
if
(
access
(
folder_builder
.
c_str
(),
0
)
!=
0
)
#ifdef _WIN32
if
(
mkdir
(
folder_builder
.
c_str
())
!=
0
)
#else
if
(
mkdir
(
folder_builder
.
c_str
(),
0777
)
!=
0
)
#endif
return
false
;
sub
.
clear
();
}
}
return
true
;
}
void
Game
::
initUtils
()
{
//user files
MakeDirectory
(
"replay"
);
//cards from extra pack
MakeDirectory
(
"expansions"
);
//files in ygopro-starter-pack
MakeDirectory
(
"deck"
);
MakeDirectory
(
"single"
);
//original files
MakeDirectory
(
"script"
);
MakeDirectory
(
"textures"
);
//sound
MakeDirectory
(
"sound"
);
MakeDirectory
(
"sound/BGM"
);
MakeDirectory
(
"sound/BGM/advantage"
);
MakeDirectory
(
"sound/BGM/deck"
);
MakeDirectory
(
"sound/BGM/disadvantage"
);
MakeDirectory
(
"sound/BGM/duel"
);
MakeDirectory
(
"sound/BGM/lose"
);
MakeDirectory
(
"sound/BGM/menu"
);
MakeDirectory
(
"sound/BGM/win"
);
//pics
MakeDirectory
(
"pics"
);
MakeDirectory
(
"pics/field"
);
}
void
Game
::
ClearTextures
()
{
void
Game
::
ClearTextures
()
{
matManager
.
mCard
.
setTexture
(
0
,
0
);
matManager
.
mCard
.
setTexture
(
0
,
0
);
imgCard
->
setImage
(
imageManager
.
tCover
[
0
]);
imgCard
->
setImage
(
imageManager
.
tCover
[
0
]);
...
...
gframe/game.h
View file @
0586e8ab
...
@@ -138,6 +138,8 @@ public:
...
@@ -138,6 +138,8 @@ public:
void
AddChatMsg
(
wchar_t
*
msg
,
int
player
);
void
AddChatMsg
(
wchar_t
*
msg
,
int
player
);
void
ClearChatMsg
();
void
ClearChatMsg
();
void
AddDebugMsg
(
char
*
msgbuf
);
void
AddDebugMsg
(
char
*
msgbuf
);
bool
MakeDirectory
(
const
std
::
string
folder
);
void
initUtils
();
void
ClearTextures
();
void
ClearTextures
();
void
CloseDuelWindow
();
void
CloseDuelWindow
();
...
...
ocgcore
@
36152ff1
Subproject commit
24dff6a9a81f3f3dae45b2e2600203a08b19a0cf
Subproject commit
36152ff19b37d8f411c1f301cc9ed9b0a7e93285
script
@
11a3cf93
Subproject commit
5f197f2d2cd3a619b48ce30d20b57a7fe5bb0d65
Subproject commit
11a3cf932ef0ba3e2dccaa4442db5d98ecc89163
strings.conf
View file @
0586e8ab
...
@@ -240,6 +240,9 @@
...
@@ -240,6 +240,9 @@
!
system
1161
效果处理
!
system
1161
效果处理
!
system
1162
效果重置
!
system
1162
效果重置
!
system
1163
灵摆召唤
!
system
1163
灵摆召唤
!
system
1164
同调召唤
!
system
1165
超量召唤
!
system
1166
连接召唤
#menu
#menu
!
system
1200
联机模式
!
system
1200
联机模式
!
system
1201
单人模式
!
system
1201
单人模式
...
...
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