summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZack Middleton <zturtleman@gmail.com>2013-10-29 23:07:15 -0500
committerTim Angus <tim@ngus.net>2014-06-17 17:43:35 +0100
commit3184c8305d8e3224cc648d453bacf6d9910b3fa6 (patch)
treef4a607710b55bf9463a67e87b2a3f9b57e2ce05c
parentd8225d0663c8eda410138c7ca086fa65912e07ae (diff)
IQM int/float vertex arrays were already swapped
-rw-r--r--src/renderergl1/tr_model_iqm.c9
-rw-r--r--src/renderergl2/tr_model_iqm.c9
2 files changed, 8 insertions, 10 deletions
diff --git a/src/renderergl1/tr_model_iqm.c b/src/renderergl1/tr_model_iqm.c
index 0636bb46..e8375b0d 100644
--- a/src/renderergl1/tr_model_iqm.c
+++ b/src/renderergl1/tr_model_iqm.c
@@ -664,7 +664,7 @@ qboolean R_LoadIQM( model_t *mod, void *buffer, int filesize, const char *mod_na
if( blendIndexesType == IQM_INT ) {
int *data = (int*)((byte*)header + vertexarray->offset);
for ( j = 0; j < n; j++ ) {
- iqmData->blendIndexes[j] = (byte)LittleLong( data[j] );
+ iqmData->blendIndexes[j] = (byte)data[j];
}
} else {
Com_Memcpy( iqmData->blendIndexes,
@@ -674,10 +674,9 @@ qboolean R_LoadIQM( model_t *mod, void *buffer, int filesize, const char *mod_na
break;
case IQM_BLENDWEIGHTS:
if( blendWeightsType == IQM_FLOAT ) {
- float *data = (float*)((byte*)header + vertexarray->offset);
- for ( j = 0; j < n; j++ ) {
- iqmData->blendWeights.f[j] = LittleFloat( data[j] );
- }
+ Com_Memcpy( iqmData->blendWeights.f,
+ (byte *)header + vertexarray->offset,
+ n * sizeof(float) );
} else {
Com_Memcpy( iqmData->blendWeights.b,
(byte *)header + vertexarray->offset,
diff --git a/src/renderergl2/tr_model_iqm.c b/src/renderergl2/tr_model_iqm.c
index 3086293d..43c6963e 100644
--- a/src/renderergl2/tr_model_iqm.c
+++ b/src/renderergl2/tr_model_iqm.c
@@ -663,7 +663,7 @@ qboolean R_LoadIQM( model_t *mod, void *buffer, int filesize, const char *mod_na
if( blendIndexesType == IQM_INT ) {
int *data = (int*)((byte*)header + vertexarray->offset);
for ( j = 0; j < n; j++ ) {
- iqmData->blendIndexes[j] = (byte)LittleLong( data[j] );
+ iqmData->blendIndexes[j] = (byte)data[j];
}
} else {
Com_Memcpy( iqmData->blendIndexes,
@@ -673,10 +673,9 @@ qboolean R_LoadIQM( model_t *mod, void *buffer, int filesize, const char *mod_na
break;
case IQM_BLENDWEIGHTS:
if( blendWeightsType == IQM_FLOAT ) {
- float *data = (float*)((byte*)header + vertexarray->offset);
- for ( j = 0; j < n; j++ ) {
- iqmData->blendWeights.f[j] = LittleFloat( data[j] );
- }
+ Com_Memcpy( iqmData->blendWeights.f,
+ (byte *)header + vertexarray->offset,
+ n * sizeof(float) );
} else {
Com_Memcpy( iqmData->blendWeights.b,
(byte *)header + vertexarray->offset,