Menu

Saving scores (Allegro)

2002-08-27
2012-09-26
  • Nobody/Anonymous

    I don't understand the *p, *c, *f ......pointers in "File routines" documentation. I want to save scores when game is over. Yes, I know I have to do the "PACKFILE* f=pack_fopen("file.fil", F_WRITE_PACKED);" -thing first. And then what ? Score variable in my program is called "hiscore". How to save this hiscore to disk and load it at the beginning of the program. The "file.fil" must exist, right ? How to create it ? I beg you to write me a simple example. Not any explanations. Just hard stuff and working lines.

    I won't stop drinking before this problem is solved. Just kidding (really?).

    Suomenkielisetkin vastaukset kelpaa. (That's a scream for help in finnish !.)

    Please help me, Real Dummy

     
    • Nobody/Anonymous

      Hello guys !

      I solved the problem with the FILE+fread+fwrite combination but some documents says that I should rather use igetl and iputl functions for portabilty. I can't use them. I only get "can't convert FILE to PACKFILE" error or something like that. Why ? Any hints ?

      Real Dummy still needs help

       
    • Nobody/Anonymous

      Don't worry again, FILE+fread+fwrite is supported in every standard C compiler (is an ANSI feature, so its likely to be in ALL compilers; I never got one without these functions)

      Regards,

      YF

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.