Browse Source

Load combined missile CLX in UNPACKED_MPQS mode

Companion PR:
https://github.com/diasurgical/devilutionx-mpq-tools/pull/8
pull/5801/head
Gleb Mazovetskiy 3 years ago
parent
commit
e9e67b3971
  1. 7
      Source/misdat.cpp

7
Source/misdat.cpp

@ -6,6 +6,7 @@
#include "misdat.h"
#include "engine/load_cl2.hpp"
#include "engine/load_clx.hpp"
#include "missiles.h"
#include "mpq/mpq_common.hpp"
#include "utils/file_name_generator.hpp"
@ -286,6 +287,11 @@ void MissileFileData::LoadGFX()
if (name[0] == '\0')
return;
#ifdef UNPACKED_MPQS
char path[MaxMpqPathSize];
*BufCopy(path, "missiles\\", name, ".clx") = '\0';
sprites.emplace(OwnedClxSpriteListOrSheet { LoadClxListOrSheet(path) });
#else
if (animFAmt == 1) {
char path[MaxMpqPathSize];
*BufCopy(path, "missiles\\", name) = '\0';
@ -294,6 +300,7 @@ void MissileFileData::LoadGFX()
FileNameGenerator pathGenerator({ "missiles\\", name }, DEVILUTIONX_CL2_EXT);
sprites.emplace(OwnedClxSpriteListOrSheet { LoadMultipleCl2Sheet<16>(pathGenerator, animFAmt, animWidth) });
}
#endif
}
void InitMissileGFX(bool loadHellfireGraphics)

Loading…
Cancel
Save