File tree Expand file tree Collapse file tree 4 files changed +10
-10
lines changed
Expand file tree Collapse file tree 4 files changed +10
-10
lines changed Original file line number Diff line number Diff line change 1+ # 1.0.3
2+ - Fixed newline parsing
3+
14# 1.0.2
25- Updated Geode SDK to 4.6.1
36
Original file line number Diff line number Diff line change 88 },
99 "id" : " alphii.gd-splash-text" ,
1010 "name" : " Splash Text!" ,
11- "version" : " v1.0.2 " ,
11+ "version" : " v1.0.3 " ,
1212 "developer" : " Alphii" ,
1313 "description" : " " ,
1414 "resources" : {
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ class $modify(ST_MenuLayer, MenuLayer)
2323
2424 if (!m_fields->m_SplashRead ) m_fields->m_SplashRead = new SplashRead (" splash.splash" );
2525 m_fields->m_SplashStr = m_fields->m_SplashRead ->getRandomLine ();
26- auto mainTitle = getChildByID (" main-title" );
26+ auto mainTitle = getChildByIDRecursive (" main-title" );
2727
2828 m_fields->m_SplashText = ScalingLabel::create (m_fields->m_SplashStr .c_str (), " goldFont.fnt" );
2929 m_fields->m_SplashText ->setScale (0 .5f / (1 .0f + 0 .05f * strlen (m_fields->m_SplashText ->getLabel ()->getString ())));
Original file line number Diff line number Diff line change @@ -46,16 +46,13 @@ bool SplashRead::loadFile()
4646 }
4747 }
4848
49- // Non-alphanumeric characters are not allowed, if we see one, we fail.
5049 // Algorithm provided by undefined06855 on Discord and Git
50+ std::string trimmedLine;
51+ trimmedLine.reserve (line.length ());
5152 for (int i = 0 ; i < line.length (); i++)
5253 {
53- if (line[i] == ' \0 ' ) continue ;
54- if (line[i] < ' ' || line[i] > ' ~' )
55- {
56- log::error (" Non-alphanumeric character detected at col {} of line {}" , i + 1 , lineNum);
57- return false ;
58- }
54+ if (line[i] == ' \0 ' || line[i] == ' \n ' || line[i] == ' \r ' || line[i] < ' ' || line[i] > ' ~' ) continue ;
55+ trimmedLine += line[i];
5956 }
6057
6158 // If our file stream fails during loading then we gotta return false
@@ -66,7 +63,7 @@ bool SplashRead::loadFile()
6663 }
6764
6865 // Finally we can push back our processed string
69- m_Lines.push_back (line );
66+ m_Lines.push_back (trimmedLine );
7067 lineNum++;
7168 }
7269
You can’t perform that action at this time.
0 commit comments