summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBogdan Devichev <b.devichev@samsung.com>2014-12-03 18:03:52 +0200
committerBogdan Devichev <b.devichev@samsung.com>2014-12-05 11:11:41 +0200
commit063c83a01dde06f3d2b4e7f86d2b5262c3b2c53e (patch)
treebad412a5c516e254ef5494cb50e67ef6c292851d
parent952027af93918b6e0bbb23796b7abb49556de12a (diff)
Model_save_load. Fix for Step 6. Tests passed.
-rw-r--r--src/modules/evas/model_loaders/obj/evas_model_load_obj.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/modules/evas/model_loaders/obj/evas_model_load_obj.c b/src/modules/evas/model_loaders/obj/evas_model_load_obj.c
index 8f2b78a80f..359d29904e 100644
--- a/src/modules/evas/model_loaders/obj/evas_model_load_obj.c
+++ b/src/modules/evas/model_loaders/obj/evas_model_load_obj.c
@@ -7,6 +7,7 @@
7#include "evas_common_private.h" 7#include "evas_common_private.h"
8#include "evas_private.h" 8#include "evas_private.h"
9 9
10//TODO Increase of stability (reading .obj file saved with any flags).
10/* set value to position [x][y] to array name which have. */ 11/* set value to position [x][y] to array name which have. */
11#define ARRAY_2D(name, x, y, count_y) (*(name + x * count_y + y)) 12#define ARRAY_2D(name, x, y, count_y) (*(name + x * count_y + y))
12 13
@@ -41,7 +42,6 @@ typedef struct _OBJ_Loader
41{ 42{
42 Eina_File *file; 43 Eina_File *file;
43 char *map; 44 char *map;
44 int length;
45} OBJ_Loader; 45} OBJ_Loader;
46 46
47static inline void 47static inline void
@@ -83,8 +83,6 @@ _obj_loader_init(OBJ_Loader *loader, const char *file)
83 goto error; 83 goto error;
84 } 84 }
85 85
86 loader->length = eina_file_size_get(loader->file);
87
88 return EINA_TRUE; 86 return EINA_TRUE;
89 87
90error: 88error:
@@ -150,7 +148,7 @@ _count_elements(OBJ_Loader loader)//count elements of mesh in .obj
150 148
151 long i = 0; 149 long i = 0;
152 /* count elements of mesh in .obj */ 150 /* count elements of mesh in .obj */
153 for (; loader.length > i; i++) 151 for (; *current != '\00'; i++)
154 { 152 {
155 if (will_check_next_char) 153 if (will_check_next_char)
156 { 154 {
@@ -276,7 +274,7 @@ evas_model_load_file_obj(Evas_3D_Mesh *mesh, const char *file)
276 i = 0; 274 i = 0;
277 275
278 /* put data to arrays */ 276 /* put data to arrays */
279 for (; loader.length > i; i++) 277 for (; *current != '\00'; i++)
280 { 278 {
281 if (will_check_next_char) 279 if (will_check_next_char)
282 { 280 {