Well, there are many ways to approach this.
Since I am doing something similar (but probably not immediately), you can use this method... (you may need to brainstorm a bit, but this is a method that just came up while reading your post)
<colors>
<001>5,6,7
<002>11,22,33
<003>55,66,77
<text>
<t1>This be the text block one<nl>
More text
<t2>This is block two
more info
more more info
<t3>
code:
print("t1","002",initialScreenInfo);
if you are interested in using the above method, I can release the library you can link to. otherwise, feel free to use the above method :)
Did you even look at you?
looool. I did some research about me and I can't find any more places where I ask for help besides PSP-Hacks (the last time I asked for help there, was on last summer) and this site, I only asked for help 2 or 3 times.
Talking about you..you asked for help more than 5 (on this site, I don't know about the other sites)
Please, only because I don't give you my code which took me a lot of work, don't be rude to me, that's not good.
Sigh. Why do some "devs" always post a new thread asking about basic programming instead of searching or looking at code already out? Seriously, it doesn't say much about a programmer when they have to ask how to read values from a text file. While printing in color IS a valid PSP question, there are so many examples already out (and threads on it here) that asking just makes them look stupid and/or lazy.
That said, I'll chip in this bit of help: Doom for the PSP has code showing how to save/load from a text config file, and how to print in color using both the debug printing and intraFont.
Basic C++/C IO(WHICH has nothing to do with this forum):
struct COLOR
{
int r,g,b
};
function COLOR* get_color_(const std::string& f,const std::string& str)
open file f
while reading file..
read line...
remove white space
if string *STR* found in line
COLOR c;
c.r = parse line starting from "r[" until "]"
c.g = parse line starting from "g[" until "]"
c.b = parse line starting from "b[" until "]"
return &c...
Usage:
COLOR* c = get_color_("theme.txt","MyColor1");
To avoid opening the file each time you need to read a color:
Create a class:
-load the data
-parse data
-get whatever you want
Art wrote:Are you blind? There's one right above you.
Add in a_noob's config file parser from pspprogramming.com and it is complete.
I saw
But i'm not a 'good' coder like you...
I understand it how to do now, but not how to code...
Art said he wasnt a good coder to me :P
Im in the same boat as you Question_dev. I found the best way to start to learn is to read a book then attempt to port over a few SDL games to get the hang of makefiles / error messages then work on debugging with PSPLink and then programming the keys into PSP with analog support and attempt something major.. (Im not up to the challenging bit yet but im not far off)
Its worth every step of this, there will always be a developer on your side to try and help understand every concept! You just have to be polite and perhaps at the end of the tutorial work on something with the dev or donate some money. w/e
I have enough trouble keeping up to HardHats Demands as it is :P