Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
YGOMobile
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
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
v
[
3
]
=
S3DVertex
(
x2
,
y2
,
z
,
0
,
0
,
nz
,
SColor
(
255
,
255
,
255
,
255
),
tu2
,
tv2
);
}
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
);
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
);
...
...
Classes/gframe/game.cpp
View file @
e21988ae
...
...
@@ -10,6 +10,8 @@
#include "netserver.h"
#include "single_mode.h"
#include <thread>
#include <string>
#include <regex>
#ifdef _IRR_ANDROID_PLATFORM_
#include <android/CAndroidGUIEditBox.h>
#include <android/CAndroidGUIComboBox.h>
...
...
@@ -2064,17 +2066,49 @@ void Game::ClearChatMsg() {
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
)
{
if
(
enable_log
&
0x1
)
{
wchar_t
wbuf
[
1024
];
BufferIO
::
DecodeUTF8
(
msg
,
wbuf
);
AddChatMsg
(
wbuf
,
9
);
}
if
(
enable_log
&
0x2
)
{
char
msgbuf
[
1040
];
std
::
snprintf
(
msgbuf
,
sizeof
msgbuf
,
"[Script Error]: %s"
,
msg
);
ErrorLog
(
msgbuf
);
}
std
::
string
message
(
msg
);
unsigned
int
cardID
=
0
;
std
::
regex
cardIdPattern
(
R"((\d{8}))"
);
auto
words_begin
=
std
::
sregex_iterator
(
message
.
begin
(),
message
.
end
(),
cardIdPattern
);
auto
words_end
=
std
::
sregex_iterator
();
for
(
std
::
sregex_iterator
i
=
words_begin
;
i
!=
words_end
;
++
i
)
{
std
::
smatch
match
=
*
i
;
cardID
=
std
::
stoul
(
match
.
str
());
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
)
{
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