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
842af877
Commit
842af877
authored
Dec 22, 2023
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Testify
parent
2de6677a
Pipeline
#24512
passed with stages
in 7 minutes and 17 seconds
Changes
8
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
25 additions
and
21 deletions
+25
-21
gframe/base64.h
gframe/base64.h
+6
-6
gframe/deck_con.cpp
gframe/deck_con.cpp
+5
-5
gframe/deck_manager.cpp
gframe/deck_manager.cpp
+4
-4
gframe/deck_manager.h
gframe/deck_manager.h
+2
-2
gframe/game.cpp
gframe/game.cpp
+1
-1
gframe/game.h
gframe/game.h
+4
-0
ocgcore
ocgcore
+1
-1
premake/gframe/ygopro.rc
premake/gframe/ygopro.rc
+2
-2
No files found.
gframe/base64.h
View file @
842af877
...
...
@@ -53,9 +53,9 @@ class Base64 {
return
(
enc_len
==
out
->
size
());
}
static
bool
Encode
(
const
char
*
input
,
size_t
input_length
,
char
*
out
,
size_t
out_length
)
{
static
bool
Encode
(
const
unsigned
char
*
input
,
size_t
input_length
,
unsigned
char
*
out
,
size_t
out_length
)
{
int
i
=
0
,
j
=
0
;
char
*
out_begin
=
out
;
unsigned
char
*
out_begin
=
out
;
unsigned
char
a3
[
3
];
unsigned
char
a4
[
4
];
...
...
@@ -148,9 +148,9 @@ class Base64 {
return
(
dec_len
==
out
->
size
());
}
static
bool
Decode
(
const
char
*
input
,
size_t
input_length
,
char
*
out
,
size_t
out_length
)
{
static
bool
Decode
(
const
unsigned
char
*
input
,
size_t
input_length
,
unsigned
char
*
out
,
size_t
out_length
)
{
int
i
=
0
,
j
=
0
;
char
*
out_begin
=
out
;
unsigned
char
*
out_begin
=
out
;
unsigned
char
a3
[
3
];
unsigned
char
a4
[
4
];
...
...
@@ -198,10 +198,10 @@ class Base64 {
return
(
out
==
(
out_begin
+
decoded_length
));
}
static
int
DecodedLength
(
const
char
*
in
,
size_t
in_length
)
{
static
int
DecodedLength
(
const
unsigned
char
*
in
,
size_t
in_length
)
{
int
numEq
=
0
;
const
char
*
in_end
=
in
+
in_length
;
const
unsigned
char
*
in_end
=
in
+
in_length
;
while
(
*--
in_end
==
'='
)
++
numEq
;
return
((
6
*
in_length
)
/
8
)
-
numEq
;
...
...
gframe/deck_con.cpp
View file @
842af877
...
...
@@ -233,9 +233,9 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
mainGame
->
wDeckCode
->
setText
(
dataManager
.
GetSysString
(
1387
));
if
(
deckManager
.
current_deck
.
main
.
size
()
>
0
||
deckManager
.
current_deck
.
extra
.
size
()
>
0
||
deckManager
.
current_deck
.
side
.
size
()
>
0
)
{
wchar_t
deck_code
[
2048
];
char
deck_code_utf8
[
1024
];
unsigned
char
deck_code_utf8
[
1024
];
deckManager
.
SaveDeckToCode
(
deckManager
.
current_deck
,
deck_code_utf8
);
BufferIO
::
DecodeUTF8
(
deck_code_utf8
,
deck_code
);
BufferIO
::
DecodeUTF8
(
(
char
*
)
deck_code_utf8
,
deck_code
);
mainGame
->
ebDeckCode
->
setText
(
deck_code
);
}
else
mainGame
->
ebDeckCode
->
setText
(
L""
);
...
...
@@ -249,9 +249,9 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
mainGame
->
HideElement
(
mainGame
->
wDeckCode
);
if
(
prev_operation
==
BUTTON_DECK_CODE
)
{
Deck
new_deck
;
char
deck_code
[
1024
];
BufferIO
::
EncodeUTF8
(
mainGame
->
ebDeckCode
->
getText
(),
deck_code
);
if
(
deckManager
.
LoadDeckFromCode
(
new_deck
,
deck_code
,
strlen
(
deck_code
)))
unsigned
char
deck_code
[
1024
];
BufferIO
::
EncodeUTF8
(
mainGame
->
ebDeckCode
->
getText
(),
(
char
*
)
deck_code
);
if
(
deckManager
.
LoadDeckFromCode
(
new_deck
,
deck_code
,
strlen
(
(
char
*
)
deck_code
)))
deckManager
.
current_deck
=
new_deck
;
else
mainGame
->
env
->
addMessageBox
(
L""
,
dataManager
.
GetSysString
(
1389
));
...
...
gframe/deck_manager.cpp
View file @
842af877
...
...
@@ -358,8 +358,8 @@ int DeckManager::TypeCount(std::vector<code_pointer> list, unsigned int ctype) {
}
return
res
;
}
bool
DeckManager
::
LoadDeckFromCode
(
Deck
&
deck
,
const
char
*
code
,
int
len
)
{
char
data
[
1024
],
*
pdeck
=
data
,
*
data_
=
data
;
bool
DeckManager
::
LoadDeckFromCode
(
Deck
&
deck
,
const
unsigned
char
*
code
,
int
len
)
{
unsigned
char
data
[
1024
],
*
pdeck
=
data
,
*
data_
=
data
;
int
decoded_len
=
Base64
::
DecodedLength
(
code
,
len
);
if
(
decoded_len
>
1024
||
decoded_len
<
8
||
!
Base64
::
Decode
(
code
,
len
,
data_
,
decoded_len
))
return
false
;
...
...
@@ -368,8 +368,8 @@ bool DeckManager::LoadDeckFromCode(Deck& deck, const char *code, int len) {
int
errorcode
=
LoadDeck
(
deck
,
(
int
*
)
pdeck
,
mainc
,
sidec
);
return
(
errorcode
==
0
);
}
int
DeckManager
::
SaveDeckToCode
(
Deck
&
deck
,
char
*
code
)
{
char
deckbuf
[
1024
],
*
pdeck
=
deckbuf
;
int
DeckManager
::
SaveDeckToCode
(
Deck
&
deck
,
unsigned
char
*
code
)
{
unsigned
char
deckbuf
[
1024
],
*
pdeck
=
deckbuf
;
BufferIO
::
WriteInt32
(
pdeck
,
deck
.
main
.
size
()
+
deck
.
extra
.
size
());
BufferIO
::
WriteInt32
(
pdeck
,
deck
.
side
.
size
());
for
(
size_t
i
=
0
;
i
<
deck
.
main
.
size
();
++
i
)
...
...
gframe/deck_manager.h
View file @
842af877
...
...
@@ -56,8 +56,8 @@ public:
bool
DeleteDeck
(
const
wchar_t
*
file
);
wchar_t
DeckFormatBuffer
[
128
];
int
TypeCount
(
std
::
vector
<
code_pointer
>
list
,
unsigned
int
ctype
);
bool
LoadDeckFromCode
(
Deck
&
deck
,
const
char
*
code
,
int
len
);
int
SaveDeckToCode
(
Deck
&
deck
,
char
*
code
);
bool
LoadDeckFromCode
(
Deck
&
deck
,
const
unsigned
char
*
code
,
int
len
);
int
SaveDeckToCode
(
Deck
&
deck
,
unsigned
char
*
code
);
bool
CreateCategory
(
const
wchar_t
*
name
);
bool
RenameCategory
(
const
wchar_t
*
oldname
,
const
wchar_t
*
newname
);
bool
DeleteCategory
(
const
wchar_t
*
name
);
...
...
gframe/game.cpp
View file @
842af877
...
...
@@ -226,7 +226,7 @@ bool Game::Initialize() {
SetWindowsIcon
();
//main menu
wchar_t
strbuf
[
256
];
myswprintf
(
strbuf
,
L"KoishiPro %X.0%X.%X Te
mpestissimo
"
,
PRO_VERSION
>>
12
,
(
PRO_VERSION
>>
4
)
&
0xff
,
PRO_VERSION
&
0xf
);
myswprintf
(
strbuf
,
L"KoishiPro %X.0%X.%X Te
stify
"
,
PRO_VERSION
>>
12
,
(
PRO_VERSION
>>
4
)
&
0xff
,
PRO_VERSION
&
0xf
);
wMainMenu
=
env
->
addWindow
(
rect
<
s32
>
(
370
,
200
,
650
,
415
),
false
,
strbuf
);
wMainMenu
->
getCloseButton
()
->
setVisible
(
false
);
btnLanMode
=
env
->
addButton
(
rect
<
s32
>
(
10
,
30
,
270
,
60
),
wMainMenu
,
BUTTON_LAN_MODE
,
dataManager
.
GetSysString
(
1200
));
...
...
gframe/game.h
View file @
842af877
...
...
@@ -80,10 +80,13 @@ struct DuelInfo {
bool
isTag
{
false
};
bool
isSingleMode
{
false
};
bool
is_shuffling
{
false
};
bool
is_swapped
{
false
};
bool
tag_player
[
2
]{
false
};
bool
isReplaySwapped
{
false
};
int
lp
[
2
]{
0
};
int
start_lp
{
0
};
int
card_count
[
2
]{
0
};
int
total_attack
[
2
]{
0
};
int
duel_rule
{
0
};
int
turn
{
0
};
short
curMsg
{
0
};
...
...
@@ -862,6 +865,7 @@ extern Game* mainGame;
#define TEXTURE_COVER_O 4
#define TEXTURE_ATTACK 5
#define TEXTURE_ACTIVATE 6
//STOC_GAME_MSG messages
#define MSG_WAITING 3
#define MSG_START 4
...
...
ocgcore
@
9fd65875
Subproject commit
e94823b222461b300c20c27f8991c19ba2f06269
Subproject commit
9fd658759d2ea95814023f366712aca334ddbf9a
premake/gframe/ygopro.rc
View file @
842af877
...
...
@@ -16,8 +16,8 @@ VALUE "InternalName", "KoishiPro"
VALUE "LegalCopyright", "Copyright (C) 2023 Nanahira"
VALUE "OriginalFilename", "ygopro.exe"
VALUE "ProductName", "KoishiPro"
VALUE "FileVersion", "Te
mpestissimo
"
VALUE "ProductVersion", "Te
mpestissimo
"
VALUE "FileVersion", "Te
stify
"
VALUE "ProductVersion", "Te
stify
"
END
END
BLOCK "VarFileInfo"
...
...
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