Need some HELP with loading/saving data to a *.TXT file using SDL

Need some HELP with loading/saving data to a *.TXT file using SDL

Hi,

Would like to use the SDL “Files (RWops)” functions
to both:

  1. Read data (each line) from a *.TXT file into separate global variables.
  2. Write data (each global variable) to a *.TXT file into separate lines.

The *.TXT file would be "Configuration.TXT"
and would look like the following:--------------------------------------------------------------
0
1
0
0
1
1
2
0
0
1
1
3
0
0
1
1
128
128

Any one with some ideas on how to do this using the SDL "Files (RWops)"
functions???

Thanks in advance!

You can see what I am working on now by visiting the following web page:
http://www.silentheroproductions.com/tetribattle3_100percentforpcwindows.htm

(http://www.silentheroproductions.com/tetribattle3_100percentforpcwindows.htm)

Jesse “JeZ+Lee” Palser, BS, A+, Network+, MCP
SLNTHERO at AOL.com
Silent Hero Productions ®
"Fun, little games for when you don’t have time to save the world.[TM]"
www.SilentHeroProductions.com (http://www.silentheroproductions.com/)

To read, just use RWops to read the whole file into memory and use
sscanf to parse it. To write, just use sprintf to write into memory,
then save it with RWops.On Fri, Apr 21, 2006 at 09:24:19AM -0400, SlntHero at aol.com wrote:

Need some HELP with loading/saving data to a *.TXT file using SDL

Hi,

Would like to use the SDL “Files (RWops)” functions
to both:

  1. Read data (each line) from a *.TXT file into separate global variables.
  2. Write data (each global variable) to a *.TXT file into separate lines.


Steaphan Greene
GPG public key: http://www.cs.binghamton.edu/~sgreene/gpg.key.txt
-------------- next part --------------
A non-text attachment was scrubbed…
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20060421/3094fb25/attachment.pgp