~rebel/horde3d/trunk

« back to all changes in this revision

Viewing changes to trunk/Tools/Dependencies/RecastNavigation/RecastDemo/Source/MeshLoaderObj.cpp

  • Committer: felix
  • Date: 2015-07-07 12:57:07 UTC
  • Revision ID: svn-v4:5ce291ac-9df0-446f-9e4f-d57731c4dda7::1699
- Updated RecastNavigation to latest version and fixed multiple issues.
- Adapted GameDetourComponent, GameDetourCrowdComponent, DetourCrowdDemo and AAA accordingly.

Show diffs side-by-side

added added

removed removed

Lines of Context:
78
78
 
79
79
static char* parseRow(char* buf, char* bufEnd, char* row, int len)
80
80
{
81
 
        bool cont = false;
82
81
        bool start = true;
83
82
        bool done = false;
84
83
        int n = 0;
90
89
                switch (c)
91
90
                {
92
91
                        case '\\':
93
 
                                cont = true; // multirow
94
92
                                break;
95
93
                        case '\n':
96
94
                                if (start) break;
103
101
                                if (start) break;
104
102
                        default:
105
103
                                start = false;
106
 
                                cont = false;
107
104
                                row[n++] = c;
108
105
                                if (n >= len-1)
109
106
                                        done = true;
153
150
                fclose(fp);
154
151
                return false;
155
152
        }
156
 
        fread(buf, bufSize, 1, fp);
 
153
        size_t readLen = fread(buf, bufSize, 1, fp);
157
154
        fclose(fp);
158
155
 
 
156
        if (readLen != 1)
 
157
        {
 
158
                delete[] buf;
 
159
                return false;
 
160
        }
 
161
 
159
162
        char* src = buf;
160
163
        char* srcEnd = buf + bufSize;
161
164
        char row[512];