mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
Fixed FrmFile struct in the previous commit
This commit is contained in:
@@ -72,8 +72,8 @@ static_assert(sizeof(AnimationSet) == 2656, "Incorrect AnimationSet definition."
|
||||
struct BoundRect {
|
||||
long x;
|
||||
long y;
|
||||
long offx;
|
||||
long offy;
|
||||
long offx; // left
|
||||
long offy; // bottom
|
||||
};
|
||||
|
||||
// Game objects (items, critters, etc.), including those stored in inventories.
|
||||
@@ -280,6 +280,20 @@ struct ElevatorFrms {
|
||||
DWORD buttons;
|
||||
};
|
||||
|
||||
#pragma pack(push, 2)
|
||||
typedef class FrmHeaderData { // sizeof 62
|
||||
public:
|
||||
DWORD version; // version num
|
||||
WORD fps; // frames per sec
|
||||
WORD actionFrame;
|
||||
WORD numFrames; // number of frames per direction
|
||||
WORD xCentreShift[6]; // shift in the X direction, of frames with orientations [0-5]
|
||||
WORD yCentreShift[6]; // shift in the Y direction, of frames with orientations [0-5]
|
||||
DWORD oriOffset[6]; // offset of first frame for direction [0-5] from begining of frame area
|
||||
DWORD frameAreaSize; // size of all frames area
|
||||
} FrmHeaderData;
|
||||
#pragma pack(pop)
|
||||
|
||||
// structures for holding frms loaded with fallout2 functions
|
||||
typedef class FrmFrameData { // sizeof 12 + 1 byte
|
||||
public:
|
||||
@@ -291,24 +305,26 @@ public:
|
||||
BYTE data[1]; // begin frame image data
|
||||
} FrmFrameData;
|
||||
|
||||
struct FrmFile {
|
||||
long id; //0x00
|
||||
short fps; //0x04
|
||||
short actionFrame; //0x06
|
||||
short frames; //0x08
|
||||
short xshift[6]; //0x0a
|
||||
short yshift[6]; //0x16
|
||||
long oriFrameOffset[6]; //0x22
|
||||
long frameAreaSize; //0x3a
|
||||
union { //0x3e
|
||||
FrmFrameData *frameData;
|
||||
short width;
|
||||
struct FrmFile { // sizeof 2954
|
||||
long id; // 0x00
|
||||
short fps; // 0x04
|
||||
short actionFrame; // 0x06
|
||||
short frames; // 0x08
|
||||
short xshift[6]; // 0x0A
|
||||
short yshift[6]; // 0x16
|
||||
long oriFrameOffset[6]; // 0x22
|
||||
long frameAreaSize; // 0x3A
|
||||
union {
|
||||
FrmFrameData* const frameData;
|
||||
struct {
|
||||
short width; // 0x3E
|
||||
short height; // 0x40
|
||||
};
|
||||
};
|
||||
short height; //0x40
|
||||
long frameSize; //0x42
|
||||
short xoffset; //0x46
|
||||
short yoffset; //0x48
|
||||
union { //0x4a
|
||||
long frameSize; // 0x42
|
||||
short xoffset; // 0x46
|
||||
short yoffset; // 0x48
|
||||
union { // 0x4A
|
||||
BYTE *pixelData;
|
||||
BYTE pixels[80 * 36]; // for tiles FRM
|
||||
};
|
||||
@@ -330,19 +346,7 @@ struct FrmFile {
|
||||
}
|
||||
};
|
||||
|
||||
#pragma pack(push, 2)
|
||||
typedef class FrmHeaderData { // sizeof 62
|
||||
public:
|
||||
DWORD version; // version num
|
||||
WORD fps; // frames per sec
|
||||
WORD actionFrame;
|
||||
WORD numFrames; // number of frames per direction
|
||||
WORD xCentreShift[6]; // shift in the X direction, of frames with orientations [0-5]
|
||||
WORD yCentreShift[6]; // shift in the Y direction, of frames with orientations [0-5]
|
||||
DWORD oriOffset[6]; // offset of first frame for direction [0-5] from begining of frame area
|
||||
DWORD frameAreaSize; // size of all frames area
|
||||
} FrmHeaderData;
|
||||
#pragma pack(pop)
|
||||
static_assert(sizeof(FrmFile) == 2954, "Incorrect FrmFile definition.");
|
||||
|
||||
// structures for loading unlisted frms
|
||||
struct UnlistedFrm {
|
||||
|
||||
@@ -1107,9 +1107,7 @@ HRESULT __stdcall InitFakeDirectDrawCreate(void*, IDirectDraw** b, void*) {
|
||||
if (textureFilter == 1) {
|
||||
int ws = static_cast<int>(wScale);
|
||||
int hs = static_cast<int>(hScale);
|
||||
if (ws == wScale && hs == hScale) {
|
||||
textureFilter = 0; // disable for integer scales
|
||||
}
|
||||
if (ws == wScale && hs == hScale) textureFilter = 0; // disable for integer scales
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user