Jump to content
  • Advertisement
Sign in to follow this  
  • entries
    2
  • comments
    0
  • views
    2273

Awsome INI Gets a New Lease on Life

Sign in to follow this  
ajm113

739 views

I'm publishing an update for Awesome INI Loader library. The library now has a new license, WTFPL. So now you may use the library for anything you wish. Why I changed it to this is because I believe code shared to the world, should be able to be modified and used by anyone with or without permission. I know some may differ, but I write code because it's fun, and I want to help the smaller guys out.

And for anyone who isn't familiar with this library:
This library will load, parse, error check, INI files, while giving the programmer full customization easily, leave small memory footprint, easy to port to any platform, and easy to add to any C++ project. The library has extremely small requirements, and will run on most C++ compilers. Great for small and big projects and gets weekly or monthly updates.

The library has a few new functions! Telling from the image, error checking and getting the data you want is 2x much simpler and faster now that the library supports these new functions...[code=:0] bool getKeyInt(int &p, const char* group, const char* key); bool getKeyBool(bool &p, const char* group, const char* key); bool getKeyString(char* dstBuffer, const char* group, const char* key); bool getKeyFloat(float &p, const char* group, const char* key);
The code is pretty much self explanatory, but I'll give a small run down...

The first arguments are the variables or buffers you wish to pass to store the data. Arguments 2 and 3 are the group and key you wish to retrieve. If everything goes well, the functions will return true, and you dont have to check the error function. Otherwise if it does you may need see whats going on.

I've also added a little documentation to the error codes in the source code in "awesome_ini.h".
Sign in to follow this  


0 Comments


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!