sceIoWrite MiltiLine Writing?
sceIoWrite MiltiLine Writing?
hmm i have started developing with C++ like 4 days ago and i need to write some text on multiple lines of a text file.
I have tried alot of ways,some one told me that sceioWrite doesn't accept \n
so i tried passing it from sprintf but when i checked the text file it writed the text but in the part where the \n was there was a small square but dint jump to the next line. >_<
Help will be greatly appreciated.
I have tried alot of ways,some one told me that sceioWrite doesn't accept \n
so i tried passing it from sprintf but when i checked the text file it writed the text but in the part where the \n was there was a small square but dint jump to the next line. >_<
Help will be greatly appreciated.
Re: sceIoWrite MiltiLine Writing?
Are you in unix or windows? It makes a difference. If you have to ask how to do line feeds for unix vs windows, you aren't ready for this. Go take some classes, then try again.AntiBNI wrote:hmm i have started developing with C++ like 4 days ago and i need to write some text on multiple lines of a text file.
I have tried alot of ways,some one told me that sceioWrite doesn't accept \n
so i tried passing it from sprintf but when i checked the text file it writed the text but in the part where the \n was there was a small square but dint jump to the next line. >_<
Help will be greatly appreciated.
Write "\r\n" instead... or alternatively open the text file with a better thing that notepad. (worpad would do it).AntiBNI wrote:Im on Windows.
I never understood why microsoft didn't make notepad to understand unix text files but they did with wordpad.... oh well, maybe they haven't touched the code of notepad in years :p
I tried that the first time but when i saw the text there was multiple lines but they where in the following order:
(X)
"1 blank space"(O)"small squarebox"
"4blank spaces"Trangle
I opened it on Notepad,im in university right now so i can't check it with wordpad or Notepad++.
So,if i put \r\n windows doesn't read it but the psp will,right?
(X)
"1 blank space"(O)"small squarebox"
"4blank spaces"Trangle
I opened it on Notepad,im in university right now so i can't check it with wordpad or Notepad++.
So,if i put \r\n windows doesn't read it but the psp will,right?
I checked with Notepad++ and Word pad and Word pad shows 2small square boxes (Null Spaces) at the beginning of the text.
Notepad++ shows 2 null spaces.
I guess sceIoRead should read them right.
**Out of topic**
I have another question.
i know that the psp has 480 x 272 in pixels but,when i put 240x136,the text doesn't appear because is WAAAY out of the screen.
but when i put 16x16 the text appears allmost at the center of the screen;i need to know the dimensions of the text on screen so i can calculate and put the text in the right place.
Thanks to every one for helping me ^_^
Notepad++ shows 2 null spaces.
I guess sceIoRead should read them right.
**Out of topic**
I have another question.
i know that the psp has 480 x 272 in pixels but,when i put 240x136,the text doesn't appear because is WAAAY out of the screen.
but when i put 16x16 the text appears allmost at the center of the screen;i need to know the dimensions of the text on screen so i can calculate and put the text in the right place.
Thanks to every one for helping me ^_^
You haven't told us how you're displaying text. For example pspDebugScreenPrintf, GU, SDL, etc. If it's pspDebugScreenPrintf then the coordinates aren't in pixels, it's in characters, so 0,1 would be the second row.AntiBNI wrote:i know that the psp has 480 x 272 in pixels but,when i put 240x136,the text doesn't appear because is WAAAY out of the screen.
but when i put 16x16 the text appears allmost at the center of the screen;i need to know the dimensions of the text on screen so i can calculate and put the text in the right place.
(+[__]%)