Hiya, pretty much coded everything i know how to code in Gigas now so im moving into all the scary stuff i dont really have a clue about, currently trying to get the SMC system working, which is vital in allowing users to create there own content and play on it without fuss. i've read up on all the SMC functions, and i've done a few tests - i can write a file into a folder of my choice with the content of my choice for instance, whic his a start.
but now i need to learn how to load data off the SMC and 'use' that data.
first up is this dillema, i have an array which is something like:
short data[200];
and i have a file on the SMC called "test.dat" which is basically a huge line of 1's and 0's, now what i'd like to do is load them one by one into the array.
so if the test.dat for instance started off as "100100"
i'd like data[0] to be 1, [1] to be 0, [2] to be 0.
you get the idea,
i tried variations of..
for (i = 0; i < collision_count; i++)
{
//Set the collisions
char *buffer;
int bytes=1;
int offset = (i * bytes);
buffer = (char*) malloc(bytes);
GpFileRead(h_file, buffer, offset, (ulong*)bytes );
collision = buffer;
}
but im confident im making a total balls job of that so if anybody would like to tell me how it should be done i'd be well chuffed as thats the biggest thing 'to do' atm.
Secondly was, do manuals exist for that GP32 Dev Util? because i can easily convert the sound files into .sef and whack them on the SMC but have no frigging clue how to use them.
before i was just including the audio into a .h file then using..
GpPcmPlay((unsigned short*)plug_sfx,plug_sfx_length, 0);
any help would be great! wish they had proper manuals out for all this stuff
but now i need to learn how to load data off the SMC and 'use' that data.
first up is this dillema, i have an array which is something like:
short data[200];
and i have a file on the SMC called "test.dat" which is basically a huge line of 1's and 0's, now what i'd like to do is load them one by one into the array.
so if the test.dat for instance started off as "100100"
i'd like data[0] to be 1, [1] to be 0, [2] to be 0.
you get the idea,
i tried variations of..
for (i = 0; i < collision_count; i++)
{
//Set the collisions
char *buffer;
int bytes=1;
int offset = (i * bytes);
buffer = (char*) malloc(bytes);
GpFileRead(h_file, buffer, offset, (ulong*)bytes );
collision = buffer;
}
but im confident im making a total balls job of that so if anybody would like to tell me how it should be done i'd be well chuffed as thats the biggest thing 'to do' atm.
Secondly was, do manuals exist for that GP32 Dev Util? because i can easily convert the sound files into .sef and whack them on the SMC but have no frigging clue how to use them.
before i was just including the audio into a .h file then using..
GpPcmPlay((unsigned short*)plug_sfx,plug_sfx_length, 0);
any help would be great! wish they had proper manuals out for all this stuff