GLProgramming.com

home :: about :: development guides :: irc :: forums :: search :: paste :: links :: contribute :: code dump

-> Click here to learn how to get live help <-


New Paste :: Recent Pastes:: Add Line Numbers


A Paste by Merlin
CGameMap::CGameMap(char *filename) {
    FILE *mapfile;
    char *buffer;

    mapfile = fopen("filename", "r");

    if (mapfile == NULL) {
        SYS_Errorf("Error loading map: %s", filename);
    }
    else {
        int i = 0;
        while(!feof(mapfile)) {
            fscanf(mapfile, "%f", mapdata[i]);
            ++i;
        }
    }

    fclose(mapfile);
}