[PATCH 2/2] d3dxof: Handle float in binary mode and remove code that becomes useless.
Christian Costa
titan.costa at gmail.com
Thu Jun 6 16:30:25 CDT 2013
---
dlls/d3dxof/parsing.c | 20 +++++++++++---------
1 file changed, 11 insertions(+), 9 deletions(-)
diff --git a/dlls/d3dxof/parsing.c b/dlls/d3dxof/parsing.c
index 69fb992..0ca54c8 100644
--- a/dlls/d3dxof/parsing.c
+++ b/dlls/d3dxof/parsing.c
@@ -753,18 +753,10 @@ static WORD parse_TOKEN(parse_buffer * buf)
}
else
{
- DWORD value;
-
- if (!read_bytes(buf, &value, 4))
- return TOKEN_ERROR;
- *(DWORD*)buf->value = value;
-
buf->list_separator = TRUE;
/* Convert list into a serie of their basic type counterpart */
token = buf->list_type_float ? TOKEN_FLOAT : TOKEN_INTEGER;
}
- dump_TOKEN(token);
- return token;
}
switch (token)
@@ -793,6 +785,17 @@ static WORD parse_TOKEN(parse_buffer * buf)
*(DWORD*)buf->value = integer;
}
break;
+ case TOKEN_FLOAT:
+ {
+ float value;
+
+ if (!read_bytes(buf, &value, 4))
+ return TOKEN_ERROR;
+ TRACE("float = %f\n", value);
+
+ *(float*)buf->value = value;
+ }
+ break;
case TOKEN_GUID:
{
char strguid[39];
@@ -842,7 +845,6 @@ static WORD parse_TOKEN(parse_buffer * buf)
case TOKEN_TEMPLATE:
case TOKEN_WORD:
case TOKEN_DWORD:
- case TOKEN_FLOAT:
case TOKEN_DOUBLE:
case TOKEN_CHAR:
case TOKEN_UCHAR:
More information about the wine-patches
mailing list