comparison dmq3d.c @ 260:0aa8647c3dfc

Etc.
author Matti Hamalainen <ccr@tnsp.org>
date Wed, 10 Oct 2012 01:02:42 +0300
parents be2ca95af493
children ddb24754a67c
comparison
equal deleted inserted replaced
259:be2ca95af493 260:0aa8647c3dfc
245 error: 245 error:
246 dmFree(indices); 246 dmFree(indices);
247 return FALSE; 247 return FALSE;
248 } 248 }
249 249
250 char *ptr = line;
251 250
252 static BOOL dmReadSprite(char *line, DM3DVectorSpriteModel *model, DMVector *pos) 251 static BOOL dmReadSprite(char *line, DM3DVectorSpriteModel *model, DMVector *pos)
253 { 252 {
254 DMVector pt; 253 DMVector pt;
255 DM3DSprite spr; 254 DM3DSprite spr;
255 char *ptr = line;
256 256
257 ptr++; 257 ptr++;
258 if (!dmReadCoordinate(line, &ptr, &pt.x, TRUE)) return FALSE; 258 if (!dmReadCoordinate(line, &ptr, &pt.x, TRUE)) return FALSE;
259 if (!dmReadCoordinate(line, &ptr, &pt.y, TRUE)) return FALSE; 259 if (!dmReadCoordinate(line, &ptr, &pt.y, TRUE)) return FALSE;
260 if (!dmReadCoordinate(line, &ptr, &pt.z, FALSE)) return FALSE; 260 if (!dmReadCoordinate(line, &ptr, &pt.z, FALSE)) return FALSE;
274 if (dmAdd3DVectorSpriteModelSprite(model, &spr, NULL) != DMERR_OK) 274 if (dmAdd3DVectorSpriteModelSprite(model, &spr, NULL) != DMERR_OK)
275 return FALSE; 275 return FALSE;
276 276
277 return TRUE; 277 return TRUE;
278 } 278 }
279 char *ptr = line;
280 279
281 static BOOL dmReadBitmap(char *line, DM3DVectorSpriteModel *model) 280 static BOOL dmReadBitmap(char *line, DM3DVectorSpriteModel *model)
282 { 281 {
283 DM3DBitmap bmp, *rbmp; 282 DM3DBitmap bmp, *rbmp;
284 int index; 283 int index;
284 char *ptr = line;
285 285
286 strncpy(bmp.name, ptr + 1, sizeof(bmp.name)); 286 strncpy(bmp.name, ptr + 1, sizeof(bmp.name));
287 bmp.img = NULL; 287 bmp.img = NULL;
288 288
289 if (dmAdd3DVectorSpriteModelBitmap(model, &bmp, &index) != DMERR_OK) 289 if (dmAdd3DVectorSpriteModelBitmap(model, &bmp, &index) != DMERR_OK)