1384
fscanf (fp, " Position: %s %s %s", buffer1, buffer2, buffer3);
1385
snprintf (fmt_str, sizeof (fmt_str),
1386
" Position: %%%lds %%%lds %%%lds",
1387
sizeof (buffer1) - 1,
1388
sizeof (buffer2) - 1,
1389
sizeof (buffer3) - 1);
1390
fscanf (fp, fmt_str, buffer1, buffer2, buffer3);
1385
1391
source->position.x = g_ascii_strtod (buffer1, &endptr);
1386
1392
source->position.y = g_ascii_strtod (buffer2, &endptr);
1387
1393
source->position.z = g_ascii_strtod (buffer3, &endptr);
1389
fscanf (fp, " Direction: %s %s %s", buffer1, buffer2, buffer3);
1395
snprintf (fmt_str, sizeof (fmt_str),
1396
" Direction: %%%lds %%%lds %%%lds",
1397
sizeof (buffer1) - 1,
1398
sizeof (buffer2) - 1,
1399
sizeof (buffer3) - 1);
1400
fscanf (fp, fmt_str, buffer1, buffer2, buffer3);
1390
1401
source->direction.x = g_ascii_strtod (buffer1, &endptr);
1391
1402
source->direction.y = g_ascii_strtod (buffer2, &endptr);
1392
1403
source->direction.z = g_ascii_strtod (buffer3, &endptr);
1394
fscanf (fp, " Color: %s %s %s", buffer1, buffer2, buffer3);
1405
snprintf (fmt_str, sizeof (fmt_str),
1406
" Color: %%%lds %%%lds %%%lds",
1407
sizeof (buffer1) - 1,
1408
sizeof (buffer2) - 1,
1409
sizeof (buffer3) - 1);
1410
fscanf (fp, fmt_str, buffer1, buffer2, buffer3);
1395
1411
source->color.r = g_ascii_strtod (buffer1, &endptr);
1396
1412
source->color.g = g_ascii_strtod (buffer2, &endptr);
1397
1413
source->color.b = g_ascii_strtod (buffer3, &endptr);
1398
1414
source->color.a = 1.0;
1400
fscanf (fp, " Intensity: %s", buffer1);
1416
snprintf (fmt_str, sizeof (fmt_str),
1417
" Intensity: %%%lds",
1418
sizeof (buffer1) - 1);
1419
fscanf (fp, fmt_str, buffer1);
1401
1420
source->intensity = g_ascii_strtod (buffer1, &endptr);