Remove flexible array member
This commit is contained in:
parent
98c6acbf11
commit
44ae520284
|
@ -415,7 +415,7 @@ unsigned char* artLockFrameData(int fid, int frame, int direction, CacheEntry**
|
||||||
frm = artGetFrame(art, frame, direction);
|
frm = artGetFrame(art, frame, direction);
|
||||||
if (frm != NULL) {
|
if (frm != NULL) {
|
||||||
|
|
||||||
return frm->data;
|
return (unsigned char*)frm + sizeof(*frm);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -777,7 +777,7 @@ unsigned char* artGetFrameData(Art* art, int frame, int direction)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
return frm->data;
|
return (unsigned char*)frm + sizeof(*frm);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 0x419880
|
// 0x419880
|
||||||
|
@ -795,9 +795,9 @@ ArtFrame* artGetFrame(Art* art, int frame, int rotation)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
ArtFrame* frm = (ArtFrame*)(art->data + art->dataOffsets[rotation]);
|
ArtFrame* frm = (ArtFrame*)((unsigned char*)art + sizeof(*art) + art->dataOffsets[rotation]);
|
||||||
for (int index = 0; index < frame; index++) {
|
for (int index = 0; index < frame; index++) {
|
||||||
frm = (ArtFrame*)(frm->data + frm->size);
|
frm = (ArtFrame*)((unsigned char*)frm + sizeof(*frm) + frm->size);
|
||||||
}
|
}
|
||||||
return frm;
|
return frm;
|
||||||
}
|
}
|
||||||
|
|
|
@ -77,7 +77,6 @@ typedef struct Art {
|
||||||
short yOffsets[6];
|
short yOffsets[6];
|
||||||
int dataOffsets[6];
|
int dataOffsets[6];
|
||||||
int field_3A;
|
int field_3A;
|
||||||
unsigned char data[];
|
|
||||||
} Art;
|
} Art;
|
||||||
#pragma pack()
|
#pragma pack()
|
||||||
|
|
||||||
|
@ -89,7 +88,6 @@ typedef struct ArtFrame {
|
||||||
int size;
|
int size;
|
||||||
short x;
|
short x;
|
||||||
short y;
|
short y;
|
||||||
unsigned char data[];
|
|
||||||
} ArtFrame;
|
} ArtFrame;
|
||||||
|
|
||||||
typedef struct ArtListDescription {
|
typedef struct ArtListDescription {
|
||||||
|
|
Loading…
Reference in New Issue