Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
YGOMobile-Cn-Ko-En
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
fallenstardust
YGOMobile-Cn-Ko-En
Commits
e21988ae
Commit
e21988ae
authored
Mar 11, 2025
by
Dark Zane
Committed by
GitHub
Mar 11, 2025
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'fallenstardust:master' into master
parents
a482ecf0
1cda9341
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
45 additions
and
11 deletions
+45
-11
Classes/gframe/drawing.cpp
Classes/gframe/drawing.cpp
+1
-1
Classes/gframe/game.cpp
Classes/gframe/game.cpp
+44
-10
No files found.
Classes/gframe/drawing.cpp
View file @
e21988ae
...
@@ -15,7 +15,7 @@ inline void SetS3DVertex(S3DVertex* v, f32 x1, f32 y1, f32 x2, f32 y2, f32 z, f3
...
@@ -15,7 +15,7 @@ inline void SetS3DVertex(S3DVertex* v, f32 x1, f32 y1, f32 x2, f32 y2, f32 z, f3
v
[
3
]
=
S3DVertex
(
x2
,
y2
,
z
,
0
,
0
,
nz
,
SColor
(
255
,
255
,
255
,
255
),
tu2
,
tv2
);
v
[
3
]
=
S3DVertex
(
x2
,
y2
,
z
,
0
,
0
,
nz
,
SColor
(
255
,
255
,
255
,
255
),
tu2
,
tv2
);
}
}
void
Game
::
SetCardS3DVertex
()
{
void
Game
::
SetCardS3DVertex
()
{
f32
defalutScale
=
(
mainGame
->
xScale
-
mainGame
->
yScale
)
/
10
;
f32
defalutScale
=
(
mainGame
->
xScale
-
mainGame
->
yScale
)
/
9.5
f
;
ALOGD
(
"cc drawing defalutScale = %f"
,
defalutScale
);
ALOGD
(
"cc drawing defalutScale = %f"
,
defalutScale
);
SetS3DVertex
(
matManager
.
vCardFront
,
-
0.35
f
+
defalutScale
,
-
0.5
f
,
0.35
f
-
defalutScale
,
0.5
f
,
0
,
1
,
0
,
0
,
1
,
1
);
SetS3DVertex
(
matManager
.
vCardFront
,
-
0.35
f
+
defalutScale
,
-
0.5
f
,
0.35
f
-
defalutScale
,
0.5
f
,
0
,
1
,
0
,
0
,
1
,
1
);
SetS3DVertex
(
matManager
.
vCardOutline
,
-
0.375
f
+
defalutScale
,
-
0.54
f
,
0.37
f
-
defalutScale
,
0.54
f
,
0
,
1
,
0
,
0
,
1
,
1
);
SetS3DVertex
(
matManager
.
vCardOutline
,
-
0.375
f
+
defalutScale
,
-
0.54
f
,
0.37
f
-
defalutScale
,
0.54
f
,
0
,
1
,
0
,
0
,
1
,
1
);
...
...
Classes/gframe/game.cpp
View file @
e21988ae
...
@@ -10,6 +10,8 @@
...
@@ -10,6 +10,8 @@
#include "netserver.h"
#include "netserver.h"
#include "single_mode.h"
#include "single_mode.h"
#include <thread>
#include <thread>
#include <string>
#include <regex>
#ifdef _IRR_ANDROID_PLATFORM_
#ifdef _IRR_ANDROID_PLATFORM_
#include <android/CAndroidGUIEditBox.h>
#include <android/CAndroidGUIEditBox.h>
#include <android/CAndroidGUIComboBox.h>
#include <android/CAndroidGUIComboBox.h>
...
@@ -2064,17 +2066,49 @@ void Game::ClearChatMsg() {
...
@@ -2064,17 +2066,49 @@ void Game::ClearChatMsg() {
chatTiming
[
i
]
=
0
;
chatTiming
[
i
]
=
0
;
}
}
}
}
std
::
string
WCharToUTF8
(
const
wchar_t
*
input
)
{
std
::
string
output
;
if
(
input
==
nullptr
)
return
output
;
char
buffer
[
1024
];
wcstombs
(
buffer
,
input
,
1024
);
output
=
buffer
;
return
output
;
}
void
Game
::
AddDebugMsg
(
const
char
*
msg
)
{
void
Game
::
AddDebugMsg
(
const
char
*
msg
)
{
if
(
enable_log
&
0x1
)
{
std
::
string
message
(
msg
);
wchar_t
wbuf
[
1024
];
unsigned
int
cardID
=
0
;
BufferIO
::
DecodeUTF8
(
msg
,
wbuf
);
std
::
regex
cardIdPattern
(
R"((\d{8}))"
);
AddChatMsg
(
wbuf
,
9
);
auto
words_begin
=
std
::
sregex_iterator
(
message
.
begin
(),
message
.
end
(),
cardIdPattern
);
}
auto
words_end
=
std
::
sregex_iterator
();
if
(
enable_log
&
0x2
)
{
for
(
std
::
sregex_iterator
i
=
words_begin
;
i
!=
words_end
;
++
i
)
{
char
msgbuf
[
1040
];
std
::
smatch
match
=
*
i
;
std
::
snprintf
(
msgbuf
,
sizeof
msgbuf
,
"[Script Error]: %s"
,
msg
);
cardID
=
std
::
stoul
(
match
.
str
());
ErrorLog
(
msgbuf
);
break
;
}
}
std
::
string
cardName
=
"Unknown"
;
if
(
cardID
!=
0
)
{
cardName
=
WCharToUTF8
(
dataManager
.
GetName
(
cardID
));
}
std
::
string
fullMsg
;
if
(
cardID
!=
0
&&
cardName
!=
"???"
)
{
fullMsg
+=
cardName
;
fullMsg
+=
":"
;
}
else
{
fullMsg
+=
""
;
}
fullMsg
+=
message
;
if
(
enable_log
&
0x1
)
{
wchar_t
wbuf
[
1024
];
BufferIO
::
DecodeUTF8
(
fullMsg
.
c_str
(),
wbuf
);
AddChatMsg
(
wbuf
,
9
);
}
if
(
enable_log
&
0x2
)
{
char
msgbuf
[
1040
];
std
::
snprintf
(
msgbuf
,
sizeof
msgbuf
,
"[Script Error]: %s"
,
fullMsg
.
c_str
());
ErrorLog
(
msgbuf
);
}
}
}
void
Game
::
ErrorLog
(
const
char
*
msg
)
{
void
Game
::
ErrorLog
(
const
char
*
msg
)
{
FILE
*
fp
=
std
::
fopen
(
"error.log"
,
"at"
);
FILE
*
fp
=
std
::
fopen
(
"error.log"
,
"at"
);
...
...
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