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
Commits
9449eec5
Commit
9449eec5
authored
Dec 31, 2016
by
mercury233
Committed by
DailyShana
Dec 31, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update loading databases (#1899)
* change the priority of db * update * update * Revert "update"
parent
7f8ff147
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
4 deletions
+4
-4
gframe/data_manager.cpp
gframe/data_manager.cpp
+1
-1
gframe/game.cpp
gframe/game.cpp
+2
-2
gframe/game.h
gframe/game.h
+1
-1
No files found.
gframe/data_manager.cpp
View file @
9449eec5
...
...
@@ -9,7 +9,7 @@ DataManager dataManager;
bool
DataManager
::
LoadDB
(
const
char
*
file
)
{
sqlite3
*
pDB
;
if
(
sqlite3_open
(
file
,
&
pDB
)
!=
SQLITE_OK
)
if
(
sqlite3_open
_v2
(
file
,
&
pDB
,
SQLITE_OPEN_READONLY
,
0
)
!=
SQLITE_OK
)
return
Error
(
pDB
);
sqlite3_stmt
*
pStmt
;
const
char
*
sql
=
"select * from datas,texts where datas.id=texts.id"
;
...
...
gframe/game.cpp
View file @
9449eec5
...
...
@@ -55,11 +55,11 @@ bool Game::Initialize() {
imageManager
.
SetDevice
(
device
);
if
(
!
imageManager
.
Initial
())
return
false
;
LoadExpansionDB
();
if
(
!
dataManager
.
LoadDB
(
"cards.cdb"
))
return
false
;
if
(
!
dataManager
.
LoadStrings
(
"strings.conf"
))
return
false
;
RefreshExpansionDB
();
dataManager
.
LoadStrings
(
"./expansions/strings.conf"
);
env
=
device
->
getGUIEnvironment
();
numFont
=
irr
::
gui
::
CGUITTFont
::
createTTFont
(
env
,
gameConf
.
numfont
,
16
);
...
...
@@ -713,7 +713,7 @@ void Game::SetStaticText(irr::gui::IGUIStaticText* pControl, u32 cWidth, irr::gu
dataManager
.
strBuffer
[
pbuffer
]
=
0
;
pControl
->
setText
(
dataManager
.
strBuffer
);
}
void
Game
::
Refresh
ExpansionDB
()
{
void
Game
::
Load
ExpansionDB
()
{
#ifdef _WIN32
char
fpath
[
1000
];
WIN32_FIND_DATAW
fdataw
;
...
...
gframe/game.h
View file @
9449eec5
...
...
@@ -82,7 +82,7 @@ public:
void
BuildProjectionMatrix
(
irr
::
core
::
matrix4
&
mProjection
,
f32
left
,
f32
right
,
f32
bottom
,
f32
top
,
f32
znear
,
f32
zfar
);
void
InitStaticText
(
irr
::
gui
::
IGUIStaticText
*
pControl
,
u32
cWidth
,
u32
cHeight
,
irr
::
gui
::
CGUITTFont
*
font
,
const
wchar_t
*
text
);
void
SetStaticText
(
irr
::
gui
::
IGUIStaticText
*
pControl
,
u32
cWidth
,
irr
::
gui
::
CGUITTFont
*
font
,
const
wchar_t
*
text
,
u32
pos
=
0
);
void
Refresh
ExpansionDB
();
void
Load
ExpansionDB
();
void
RefreshDeck
(
irr
::
gui
::
IGUIComboBox
*
cbDeck
);
void
RefreshReplay
();
void
RefreshSingleplay
();
...
...
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