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
159c60aa
Commit
159c60aa
authored
Jul 26, 2017
by
VanillaSalt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
f112c10d
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
9 additions
and
36 deletions
+9
-36
gframe/data_manager.cpp
gframe/data_manager.cpp
+1
-6
gframe/deck_manager.cpp
gframe/deck_manager.cpp
+2
-12
gframe/game.cpp
gframe/game.cpp
+1
-5
gframe/replay.cpp
gframe/replay.cpp
+2
-5
gframe/single_mode.cpp
gframe/single_mode.cpp
+3
-8
No files found.
gframe/data_manager.cpp
View file @
159c60aa
...
...
@@ -78,12 +78,7 @@ bool DataManager::LoadStrings(const char* file) {
char
linebuf
[
256
];
char
strbuf
[
256
];
int
value
;
fseek
(
fp
,
0
,
SEEK_END
);
int
fsize
=
ftell
(
fp
);
fseek
(
fp
,
0
,
SEEK_SET
);
fgets
(
linebuf
,
256
,
fp
);
while
(
ftell
(
fp
)
<
fsize
)
{
fgets
(
linebuf
,
256
,
fp
);
while
(
fgets
(
linebuf
,
256
,
fp
))
{
if
(
linebuf
[
0
]
!=
'!'
)
continue
;
sscanf
(
linebuf
,
"!%s"
,
strbuf
);
...
...
gframe/deck_manager.cpp
View file @
159c60aa
...
...
@@ -13,12 +13,7 @@ void DeckManager::LoadLFList() {
char
linebuf
[
256
];
wchar_t
strBuffer
[
256
];
if
(
fp
)
{
fseek
(
fp
,
0
,
SEEK_END
);
int
fsize
=
ftell
(
fp
);
fseek
(
fp
,
0
,
SEEK_SET
);
fgets
(
linebuf
,
256
,
fp
);
while
(
ftell
(
fp
)
<
fsize
)
{
fgets
(
linebuf
,
256
,
fp
);
while
(
fgets
(
linebuf
,
256
,
fp
))
{
if
(
linebuf
[
0
]
==
'#'
)
continue
;
int
p
=
0
,
sa
=
0
,
code
,
count
;
...
...
@@ -191,12 +186,7 @@ bool DeckManager::LoadDeck(const wchar_t* file) {
int
cardlist
[
128
];
bool
is_side
=
false
;
char
linebuf
[
256
];
fseek
(
fp
,
0
,
SEEK_END
);
int
fsize
=
ftell
(
fp
);
fseek
(
fp
,
0
,
SEEK_SET
);
fgets
(
linebuf
,
256
,
fp
);
while
(
ftell
(
fp
)
<
fsize
&&
ct
<
128
)
{
fgets
(
linebuf
,
256
,
fp
);
while
(
fgets
(
linebuf
,
256
,
fp
)
&&
ct
<
128
)
{
if
(
linebuf
[
0
]
==
'!'
)
{
is_side
=
true
;
continue
;
...
...
gframe/game.cpp
View file @
159c60aa
...
...
@@ -931,11 +931,7 @@ void Game::LoadConfig() {
gameConf
.
separate_clear_button
=
1
;
gameConf
.
auto_search_limit
=
-
1
;
gameConf
.
chkIgnoreDeckChanges
=
0
;
fseek
(
fp
,
0
,
SEEK_END
);
int
fsize
=
ftell
(
fp
);
fseek
(
fp
,
0
,
SEEK_SET
);
while
(
ftell
(
fp
)
<
fsize
)
{
fgets
(
linebuf
,
256
,
fp
);
while
(
fgets
(
linebuf
,
256
,
fp
))
{
sscanf
(
linebuf
,
"%s = %s"
,
strbuf
,
valbuf
);
if
(
!
strcmp
(
strbuf
,
"antialias"
))
{
gameConf
.
antialias
=
atoi
(
valbuf
);
...
...
gframe/replay.cpp
View file @
159c60aa
...
...
@@ -159,18 +159,15 @@ bool Replay::OpenReplay(const wchar_t* name) {
}
if
(
!
fp
)
return
false
;
fseek
(
fp
,
0
,
SEEK_END
);
comp_size
=
ftell
(
fp
)
-
sizeof
(
pheader
);
fseek
(
fp
,
0
,
SEEK_SET
);
fread
(
&
pheader
,
sizeof
(
pheader
),
1
,
fp
);
if
(
pheader
.
flag
&
REPLAY_COMPRESSED
)
{
fread
(
comp_data
,
0x1000
,
1
,
fp
);
comp_size
=
fread
(
comp_data
,
1
,
0x1000
,
fp
);
fclose
(
fp
);
replay_size
=
pheader
.
datasize
;
if
(
LzmaUncompress
(
replay_data
,
&
replay_size
,
comp_data
,
&
comp_size
,
pheader
.
props
,
5
)
!=
SZ_OK
)
return
false
;
}
else
{
fread
(
replay_data
,
0x20000
,
1
,
fp
);
comp_size
=
fread
(
replay_data
,
1
,
0x20000
,
fp
);
fclose
(
fp
);
replay_size
=
comp_size
;
}
...
...
gframe/single_mode.cpp
View file @
159c60aa
...
...
@@ -830,15 +830,10 @@ byte* SingleMode::ScriptReader(const char* script_name, int* slen) {
#endif
if
(
!
fp
)
return
0
;
fseek
(
fp
,
0
,
SEEK_END
);
unsigned
int
len
=
ftell
(
fp
);
if
(
len
>
sizeof
(
buffer
))
{
int
len
=
fread
(
buffer
,
1
,
sizeof
(
buffer
),
fp
);
fclose
(
fp
);
if
(
len
>=
sizeof
(
buffer
))
return
0
;
}
fseek
(
fp
,
0
,
SEEK_SET
);
fread
(
buffer
,
len
,
1
,
fp
);
fclose
(
fp
);
*
slen
=
len
;
return
buffer
;
}
...
...
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